Re: [0/3]kprobes-base-268-rc3.patch

Andi Kleen
2004-08-09T11:26:10Z

On Sun, Aug 08, 2004 at 10:23:15PM -0400, S Vamsikrishna wrote:
> Hi,
>
> A few comments/questions on this patch:
>
> - An unconditional call is added in the do_page_fault hot path. Is this
> ok?
> The version of kprobes that hooks directly into the do_page_fault is
> better
> in the common case of page fault occuring outside of the kprobe handler,
> the overhead is only a global variable load and compare.

If this should be a problem the notifier can be changed again to do
a quick check inline if the notifier list is empty or not.

The old notifiers were fully inline, but that was changed later.

>
> - Would the absence of any locking on the read-side of the notifier chains
> cause any problems, especially when it is in a frequently hit place
> like the do_page_fault?

The notifiers were intended to not be unloaded originally. But with RCU
you could unload them anyways

(ok would probably need some depends memory barriers in the notifier
walk on Alpha, should work everywhere else)

-Andi