diff options
author | Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> | 2006-06-26 03:25:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:22 -0400 |
commit | 1bd858a507937cef6e8ca5efc6820a5744e73683 (patch) | |
tree | 2c935864cb3375c16aa7a2fd84d797aca78afd14 /include | |
parent | 36721656776f177280ccb50477a02e86e6444292 (diff) |
[PATCH] Notify page fault call chain for x86_64
Currently in the do_page_fault() code path, we call notify_die(DIE_PAGE_FAULT,
...) to notify the page fault. Since notify_die() is highly overloaded, this
page fault notification is currently being sent to all the components
registered with register_die_notification() which uses the same die_chain to
loop for all the registered components which is unnecessary.
In order to optimize the do_page_fault() code path, this critical page fault
notification is now moved to different call chain and the test results showed
great improvements.
And the kprobes which is interested in this notifications, now registers onto
this new call chain only when it need to, i.e Kprobes now registers for page
fault notification only when their are an active probes and unregisters from
this page fault notification when no probes are active.
I have incorporated all the feedback given by Ananth and Keith and everyone,
and thanks for all the review feedback.
This patch:
Overloading of page fault notification with the notify_die() has performance
issues(since the only interested components for page fault is kprobes and/or
kdb) and hence this patch introduces the new notifier call chain exclusively
for page fault notifications their by avoiding notifying unnecessary
components in the do_page_fault() code path.
Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86_64/kdebug.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-x86_64/kdebug.h b/include/asm-x86_64/kdebug.h index cf795631d9b4..cd52c7f33bca 100644 --- a/include/asm-x86_64/kdebug.h +++ b/include/asm-x86_64/kdebug.h | |||
@@ -15,6 +15,8 @@ struct die_args { | |||
15 | 15 | ||
16 | extern int register_die_notifier(struct notifier_block *); | 16 | extern int register_die_notifier(struct notifier_block *); |
17 | extern int unregister_die_notifier(struct notifier_block *); | 17 | extern int unregister_die_notifier(struct notifier_block *); |
18 | extern int register_page_fault_notifier(struct notifier_block *); | ||
19 | extern int unregister_page_fault_notifier(struct notifier_block *); | ||
18 | extern struct atomic_notifier_head die_chain; | 20 | extern struct atomic_notifier_head die_chain; |
19 | 21 | ||
20 | /* Grossly misnamed. */ | 22 | /* Grossly misnamed. */ |