]> Gentwo Git Trees - linux/.git/commit
sched_ext: Refactor lockup handlers into handle_lockup()
authorTejun Heo <tj@kernel.org>
Tue, 11 Nov 2025 19:18:10 +0000 (09:18 -1000)
committerTejun Heo <tj@kernel.org>
Wed, 12 Nov 2025 16:43:44 +0000 (06:43 -1000)
commit4ba54a6cbd4ddde805b769b4be04623a2ce1668c
tree253371dc233c3098d11c1ef914d0f739e82ffd76
parentf2fe382e1f9e568e6702f4ee416de587e9d6b671
sched_ext: Refactor lockup handlers into handle_lockup()

scx_rcu_cpu_stall() and scx_softlockup() share the same pattern: check if the
scheduler is enabled under RCU read lock and trigger an error if so. Extract
the common pattern into handle_lockup() helper. Add scx_verror() macro and use
guard(rcu)().

This simplifies both handlers, reduces code duplication, and prepares for
hardlockup handling.

Reviewed-by: Dan Schatzberg <schatzberg.dan@gmail.com>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Cc: Emil Tsalapatis <etsal@meta.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c