[lkml]   [2013]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 10/13] tracing/uprobes: Fetch args before reserving a ring buffer
On Sat, Aug 10, 2013 at 12:20 AM, Oleg Nesterov <> wrote:
> Sorry, I didn't read this series yet. Not that I think this needs my
> help, but I'll try to do this a later...
> On 08/09, Masami Hiramatsu wrote:
> >
> > I just concern using kmalloc() in the event handler.
> GFP_KERNEL should be fine for uprobe handler.
> However, iirc this conflicts with the patches from Jovi,
> "Support ftrace_event_file base multibuffer" adds rcu_read_lock()
> around uprobe_trace_print().

(Sorry about html text rejected by, send again with plain text.)

Then we might need to call kmalloc before rcu_read_lock, also call kfree
after rcu_read_unlock.

And it's not needed to call kmalloc for each instances in multi-buffer
case, just
kmalloc once is enough.

I also have same concern about use kmalloc in uprobe handler, use kmalloc
in uprobe handler seems have a little overhead, why not pre-allocate one page
static memory for temp buffer(perhaps trace_uprobe based)? one page size
would be enough for all uprobe args storage, then we don't need to call
kmalloc in that "fast path".

> Steven, Jovi, what should we do with that patch? It seems that it
> was forgotten.
> I can take these patches into my ubprobes branch and then ask Ingo
> to pull. But this will complicate the routing of the new changes
> like this.
> Oleg.

 \ /
  Last update: 2013-08-10 03:41    [W:0.117 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site