lkml.org 
[lkml]   [2021]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] tracepoint: Do not fail unregistering a probe due to memory failure
On Wed, 27 Jan 2021 13:13:22 -0500 (EST)
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:

> > Thanks for bringing that up.
>
> Requiring an RCU synchronize on element removal is quite intrusive, and can
> be problematic if tracepoint removal is called from e.g. preempt-off context.

But how often do you remove more than one callback from the same
tracepoint? Or should I say, from a lot of tracepoints?

This will only synchronize for the following case:

Add three callbacks to a single tracepoint.
Remove the first one.
<rcu callback to update the counters>
Remove the second one
<triggers a synchronization if the counters have not been finished
updating>
Remove the third one.
<no synchronization needed, because it's being freed>

And we may be able to make this work in batch too.

More to come, but I really like this approach over the others because it
does not increase the size of the kernel for a failure that should never
happen in practice.

-- Steve

\
 
 \ /
  Last update: 2021-01-27 20:18    [W:0.468 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site