]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf/core: Simplify __detach_global_ctx_data()
authorNamhyung Kim <namhyung@kernel.org>
Wed, 11 Feb 2026 22:32:21 +0000 (14:32 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 27 Feb 2026 15:40:22 +0000 (16:40 +0100)
commitda45c8d5f051434a3c68397e66ae2d3b3c97cdec
treeeac0be6ee982477dffeac0dada09d1415c48289d
parentbec2ee2390c95ed0c44494340464e69e79802e4a
perf/core: Simplify __detach_global_ctx_data()

Like in the attach_global_ctx_data() it has a O(N^2) loop to delete task
context data for each thread.  But perf_free_ctx_data_rcu() can be
called under RCU read lock, so just calls it directly rather than
iterating the whole thread list again.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260211223222.3119790-4-namhyung@kernel.org
kernel/events/core.c