From: Mathieu Desnoyers Date: Mon, 8 Aug 2016 21:08:00 +0000 (-0400) Subject: Fix: many-events registration/unregistration speed X-Git-Tag: v2.9.0-rc1~26 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=baa1e0bcf6630bd3f9282b82586d1a730f3d7ae2;hp=baa1e0bcf6630bd3f9282b82586d1a730f3d7ae2;p=lttng-ust.git Fix: many-events registration/unregistration speed Batch invocation of synchronize_rcu() when unregistering many events from a session. Also batch invocation of synchronize_rcu() when registering the same events within many concurrent sessions (starting from the 2nd session). Those slowdowns are noticeable with applications processes that have a short life-time, e.g. shell scripts spawning multiple short-lived processes take significantly longer to complete when LD_PRELOADing a UST probe provider. This slowdown only occurs when UST tracing sessions are created in the session daemon. tracepoint_probe_update_all() (currently unused) implements a similar mechanism which has the downside of iterating on all events in all probe libraries (not as efficient). Move synchronize_rcu() in tracepoint_probe_update_all() outside of the iteration on all events to free in this function, because it is only needed between the last callsite update and the first memory reclaim, not between list removal and reclaim. Signed-off-by: Mathieu Desnoyers ---