This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question: kprobe fault handler


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]