This is the mail archive of the systemtap@sourceware.org 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: djprobes status


Hi Ingo,

Ingo Molnar wrote:
> yes, my suggestion above was to occasionally do (for every 1000 buffers
> or 10000 buffers) something like:
> 
> 	freeze_processes();
> 	list_for_each_entry(&list)
> 		release_buffer(buffer);
> 	thaw_processes();
> 
> this way the trampoline code is the simplest possible (and the fastest
> possible) as we dont have to add preempt_disable()/enable() to the
> trampoline code. Am i missing some important complication?

No, you're right. I like this idea because of architecture-
independence and simplicity.

I think this method can be applied to ensure the safety of
kprobe-booster on preemptive kernel. Actually, the kprobe-booster
implementation is very similar to the bottom half of the djprobe.
It executes copied instruction directly and jumps back to the kernel
code, instead of single-stepping.
Thus, if some processes are preempted on the copied instruction,
it cannot release the buffer which contains the copied instruction.
Currently, the kprobe-booster is disabled on the preemptive kernel,
but I'll make the patch to enable it by using these functions and try it!

Thanks a lot!

-- 
Masami HIRAMATSU
2nd Research Dept.
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



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