diff options
author | Andrii Nakryiko <[email protected]> | 2024-09-03 10:45:57 -0700 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2024-09-05 16:56:13 +0200 |
commit | 8617408f7a01e94ce1f73e40a7704530e5dfb25c (patch) | |
tree | 99df1ffa0909231d70f80b274512d789a48d55f6 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 3f7f1a64da731749f1bbd7424b44c1ec6191f21c (diff) |
uprobes: protected uprobe lifetime with SRCU
To avoid unnecessarily taking a (brief) refcount on uprobe during
breakpoint handling in handle_swbp for entry uprobes, make find_uprobe()
not take refcount, but protect the lifetime of a uprobe instance with
RCU. This improves scalability, as refcount gets quite expensive due to
cache line bouncing between multiple CPUs.
Specifically, we utilize our own uprobe-specific SRCU instance for this
RCU protection. put_uprobe() will delay actual kfree() using call_srcu().
For now, uretprobe and single-stepping handling will still acquire
refcount as necessary. We'll address these issues in follow up patches
by making them use SRCU with timeout.
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Oleg Nesterov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions