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: [RFC] [PATCH 6/6] Kprobes: Remove breakpoints from the copied pages


On Wed, 10 May 2006, Prasanna S Panchamukhi wrote:
> 
> As Andi Kleen and Christoph suggested pagecache contention can be avoided
> using the COW approach.

Yes, COWing is fine, I've no pagecache qualms if you go that way.

> Some thoughts about COW implications AFAIK
> 1. Need to hookup mmap() to make a per process copy.
I don't understand.
> 2. Bring in the pages just to insert the probes.
They'll be faulted in to insert probes, yes.
> 3. All the text pages need to be in memory until process exits.
No, COWed pages can go out to swap.
> 4. Free up the per process text pages by hooking exit() and exec().
exit_mmap frees process pages on exit and exec.
> 5. Maskoff probes visible across fork(), by hooking fork().
Depends on what semantics you want across fork.

Perhaps I don't understand, but you seem to be overcomplicating it,
seeing VM (mm) problems which would be automatically handled for you.

Wouldn't you just use ptrace(2) to insert and remove your uprobes?
See access_process_vm in kernel/ptrace.c for what that would do.
It goes on to get_user_pages to do the faulting and COWing.

Hugh


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