summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/parallel-perf.py
diff options
context:
space:
mode:
authorChuyi Zhou <zhouchuyi@bytedance.com>2026-07-09 20:29:21 +0800
committerThomas Gleixner <tglx@kernel.org>2026-07-16 09:24:55 +0200
commitcdf0ba15c0898a04f55ca396d119b97bbcd801bc (patch)
tree1c6018e157ba32bf6ab4c4619dc638ef62b42735 /tools/perf/scripts/python/parallel-perf.py
parentb46883305f26188bf0555d06e77f43ab01d5ec95 (diff)
smp: Enable preemption early in smp_call_function_single()
smp_call_function_single() disables preemption while it validates the target CPU, prepares the call single data, queues the callback and sends the IPI. For the !wait case, preemption protects the per-CPU csd_data from concurrent modification by another task on the same CPU. For the wait case, the CSD is stack allocated and no other task can reuse it. CPU pinning is still required until the callback has been queued and the IPI has been sent, to ensure that the target CPU cannot be offlined after the online check but before dispatch. After generic_exec_single() has queued the callback, the synchronous csd_lock_wait() invocation at the end of the execution does not require the caller to remain pinned to the current CPU. Enable preemption before csd_lock_wait() to shorten the preemption-disabled section. Signed-off-by: Chuyi Zhou <zhouchuyi@bytedance.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Tested-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Muchun Song <muchun.song@linux.dev> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://patch.msgid.link/20260709122933.4021501-3-zhouchuyi@bytedance.com
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions