Commit 4ba54a6
committed
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>1 parent f2fe382 commit 4ba54a6
1 file changed
Lines changed: 25 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
| |||
3654 | 3655 | | |
3655 | 3656 | | |
3656 | 3657 | | |
3657 | | - | |
3658 | | - | |
3659 | | - | |
3660 | | - | |
3661 | | - | |
3662 | | - | |
3663 | | - | |
3664 | | - | |
3665 | | - | |
| 3658 | + | |
3666 | 3659 | | |
3667 | 3660 | | |
| 3661 | + | |
3668 | 3662 | | |
3669 | | - | |
| 3663 | + | |
3670 | 3664 | | |
3671 | 3665 | | |
3672 | | - | |
3673 | | - | |
| 3666 | + | |
3674 | 3667 | | |
3675 | | - | |
3676 | 3668 | | |
3677 | 3669 | | |
3678 | 3670 | | |
3679 | 3671 | | |
3680 | | - | |
| 3672 | + | |
| 3673 | + | |
| 3674 | + | |
| 3675 | + | |
3681 | 3676 | | |
3682 | | - | |
3683 | 3677 | | |
3684 | 3678 | | |
| 3679 | + | |
3685 | 3680 | | |
3686 | | - | |
3687 | | - | |
3688 | | - | |
3689 | | - | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
3690 | 3692 | | |
3691 | 3693 | | |
3692 | 3694 | | |
| |||
3701 | 3703 | | |
3702 | 3704 | | |
3703 | 3705 | | |
3704 | | - | |
3705 | | - | |
3706 | | - | |
3707 | | - | |
3708 | | - | |
3709 | | - | |
3710 | | - | |
3711 | | - | |
3712 | | - | |
3713 | | - | |
3714 | | - | |
3715 | | - | |
3716 | | - | |
3717 | | - | |
3718 | | - | |
3719 | | - | |
3720 | | - | |
3721 | | - | |
| 3706 | + | |
| 3707 | + | |
3722 | 3708 | | |
3723 | | - | |
3724 | | - | |
3725 | | - | |
| 3709 | + | |
| 3710 | + | |
3726 | 3711 | | |
3727 | 3712 | | |
3728 | 3713 | | |
| |||
0 commit comments