This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
Re: Question: kprobe fault handler
- From: Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>
- To: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>
- Cc: systemtap at sources dot redhat dot com, prasanna at in dot ibm dot com
- Date: Tue, 10 May 2005 16:34:42 -0400
- Subject: Re: Question: kprobe fault handler
- References: <44BDAFB888F59F408FAE3CC35AB47041019B67C9@orsmsx409>
- Reply-to: ananth at in dot ibm dot com
On Tue, May 10, 2005 at 12:35:48PM -0700, Keshavamurthy, Anil S wrote:
Hi Anil,
> I am trying to support kprobe fault handler (on IA64 ) and
> looking at the other architecture, I see they have added this call chain
> notification in fault.c.
>
....
>
> Looking at this seems to be a bit heavyweight as we will be trying to
> call this call chain notification for every page fault. I guess same
> question was asked in the LKML mailing list. Do we know the overhead of
> this?
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
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.
> Also, I would like to know how to test this feature where kprobe fault
> handler
> will completely handle the page fault and return NOTIFY_STOP. Is there a
> sample code for i386 that I can take a look at it?
I can't think off hand if there was a test module (or numbers to show
overhead) for this. Maybe Prasanna will know.
Ananth