summaryrefslogtreecommitdiff
path: root/tools/include/uapi/linux
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2026-01-12 08:51:57 -0800
committerPeter Zijlstra <peterz@infradead.org>2026-01-15 10:04:26 +0100
commit4960626f956d63dce57f099016c2ecbe637a8229 (patch)
treed394ccb3dd01dce7e304fe345e1f6d025db0e5b6 /tools/include/uapi/linux
parenteebe6446ccb75ecb36cb145ab1cbc3db06cbc8d6 (diff)
perf/core: Fix slow perf_event_task_exit() with LBR callstacks
I got a report that a task is stuck in perf_event_exit_task() waiting for global_ctx_data_rwsem. On large systems with lots threads, it'd have performance issues when it grabs the lock to iterate all threads in the system to allocate the context data. And it'd block task exit path which is problematic especially under memory pressure. perf_event_open perf_event_alloc attach_perf_ctx_data attach_global_ctx_data percpu_down_write (global_ctx_data_rwsem) for_each_process_thread alloc_task_ctx_data do_exit perf_event_exit_task percpu_down_read (global_ctx_data_rwsem) It should not hold the global_ctx_data_rwsem on the exit path. Let's skip allocation for exiting tasks and free the data carefully. Reported-by: Rosalie Fang <rosaliefang@google.com> Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260112165157.1919624-1-namhyung@kernel.org
Diffstat (limited to 'tools/include/uapi/linux')
0 files changed, 0 insertions, 0 deletions