]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
watchdog/hardlockup: simplify perf event probe and remove per-cpu dependency
authorQiliang Yuan <realwujing@gmail.com>
Thu, 29 Jan 2026 02:26:14 +0000 (21:26 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 8 Feb 2026 08:13:35 +0000 (00:13 -0800)
commit0dddf20b4fd4afd59767acc144ad4da60259f21f
treeef3b0539c9f252a003ad2abdabb78ecfa0086d51
parent76149d53502cf17ef3ae454ff384551236fba867
watchdog/hardlockup: simplify perf event probe and remove per-cpu dependency

Simplify the hardlockup detector's probe path and remove its implicit
dependency on pinned per-cpu execution.

Refactor hardlockup_detector_event_create() to be stateless.  Return the
created perf_event pointer to the caller instead of directly modifying the
per-cpu 'watchdog_ev' variable.  This allows the probe path to safely
manage a temporary event without the risk of leaving stale pointers should
task migration occur.

Link: https://lkml.kernel.org/r/20260129022629.2201331-1-realwujing@gmail.com
Signed-off-by: Shouxin Sun <sunshx@chinatelecom.cn>
Signed-off-by: Junnan Zhang <zhangjn11@chinatelecom.cn>
Signed-off-by: Qiliang Yuan <yuanql9@chinatelecom.cn>
Signed-off-by: Qiliang Yuan <realwujing@gmail.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Cc: Jinchao Wang <wangjinchao600@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Li Huafei <lihuafei1@huawei.com>
Cc: Song Liu <song@kernel.org>
Cc: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Wang Jinchao <wangjinchao600@gmail.com>
Cc: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/watchdog_perf.c