Re: [PATCH v3 tip/core/rcu 3/9] rcu: Add synchronous grace-period waiting for RCU-tasks

Steven Rostedt
2014-08-08T16:10:59Z

On Fri, 8 Aug 2014 18:01:28 +0200
Peter Zijlstra <peterz@infradead.org> wrote:

> Well, see the _BIG_ difference is that currently, when I do nop >
> current_tracer all that memory is instantly freed again.
>
> With the proposed scheme, if I setup state, reconsider, destroy state,
> try again, and generally muck about I can tie up unspecified amounts of
> memory.
>
> And being the bumbling idiot that I am, that's actually fairly typical
> of how I end up tracing. There's no neat and tidy, I trace something,
> look at the trace, script a little, muck about with the settings and
> goto 1.

It would actually be trivial to make that case never free the
trampoline associated to function tracing. As that is a static ops that
never gets freed, the trampoline it uses doesn't need to be freed
either.

But, if you were to do:

# cd /sys/kernel/debug/tracing
# mkdir instances/foo
# cd instances/foo
1: # echo function > current_tracer
# echo nop > current_tracer
goto 1

Then, yeah that could do it.

>
>
> In any case, I think I now fully understand what you're trying to do,
> just not sure its all win.

Fair enough.

-- Steve