aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpicoder.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-09-03 10:45:57 -0700
committerPeter Zijlstra <peterz@infradead.org>2024-09-05 16:56:13 +0200
commit8617408f7a01e94ce1f73e40a7704530e5dfb25c (patch)
tree99df1ffa0909231d70f80b274512d789a48d55f6 /lib/crypto/mpi/mpicoder.c
parent3f7f1a64da731749f1bbd7424b44c1ec6191f21c (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 <andrii@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Link: https://lore.kernel.org/r/20240903174603.3554182-3-andrii@kernel.org
Diffstat (limited to 'lib/crypto/mpi/mpicoder.c')
0 files changed, 0 insertions, 0 deletions