This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
Re: Question: kprobe fault handler
- From: Keshavamurthy Anil S <anil dot s dot keshavamurthy at intel dot com>
- To: Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>
- Cc: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, systemtap at sources dot redhat dot com, prasanna at in dot ibm dot com
- Date: Tue, 10 May 2005 16:01:58 -0700
- Subject: Re: Question: kprobe fault handler
- References: <44BDAFB888F59F408FAE3CC35AB47041019B67C9@orsmsx409> <20050510203442.GA4839@in.ibm.com>
- Reply-to: Keshavamurthy Anil S <anil dot s dot keshavamurthy at intel dot com>
On Tue, May 10, 2005 at 04:34:42PM -0400, Ananth N Mavinakayanahalli wrote:
> On Tue, May 10, 2005 at 12:35:48PM -0700, Keshavamurthy, Anil S wrote:
> I think the best explaination as to why that hook is needed in the
> fast-path was given by Dave Miller. Please see:
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=109898820219611&w=2
Thanks for the link.
>
> The overhead is: notifier_call_chain() -> kprobe_running() check in
> kprobe_exceptions_notify(). And, if any other debugger/utility
> (eg., kgdb) is using the die_notifier, it will also be invoked.
So you are saying that for every page fault, the overhead is
notifier_call_chain()->kprobe_exception_notify()->kprobe_running(),
I agree this is very small when you don't have any kprobes registered.
Imagine a case where 1000 Kprobes are registered and in this
case for every pagefault, notifier_call_chain() has to loop for 1000
times, this seems to me an overkill. Please correct me if I am wrong.
-Anil