lkml.org 
[lkml]   [2019]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 03/14 v2] function_graph: Allow multiple users to attach to function graph
On Fri, 24 May 2019 14:27:24 +0200
Peter Zijlstra <peterz@infradead.org> wrote:

> > Believe me, I rather not have that array, but I couldn't come up with a
> > better solution to handle freeing of fgraph_ops.
>
> The trivial answer would be to refcount the thing, but can't we make
> rcu_tasks do this?

But wouldn't refcounts require atomic operations, something that would
be excruciatingly slow for something that runs on all functions.

rcu_tasks doesn't cross voluntary sleeps, which this does.

>
> And delay the unreg until all active users are gone -- who gives a crap
> that can take a while.

It could literally be forever (well, until the machine reboots). And
something that could appear to be a memory leak, although a very slow
one. But probably be hard to have more than the number of tasks on the
system.

-- Steve

\
 
 \ /
  Last update: 2019-05-24 14:58    [W:0.077 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site