lkml.org 
[lkml]   [2013]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ftrace multibuffer && rcu (Was: tracing/uprobes: Support ftrace_event_file base multibuffer)
On 06/14, Oleg Nesterov wrote:
>
> So perhaps something like below (untested) makes sense? With this patch
> we can trivially convert trace_kprobe.c to use list_add/del/each_rcu.

Forgot to mention, the patch is obviously incomplete, __kprobe_trace_func()
can see the "dead" file even if its memory can't go away. But this looks
fixable.

> +static inline struct event_file_link *
> +alloc_event_file_link(struct ftrace_event_file *file)
> +{
> + struct event_file_link *link = kmalloc(sizeof(*link), GFP_KERNEL);
> + if (link)
> + link->file = file;
> + return link;
> +}

And this lacks atomic_inc(file->refcnt).

In short, this is just to explain what I meant, the actual change should
probably differ.

Oleg.



\
 
 \ /
  Last update: 2013-06-14 19:01    [W:0.070 / U:7.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site