mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
sched_ext: Report NMI kicks with scx_error()
The per-cpu kick lists are protected by IRQ masking which doesn't stop NMIs, so scx_bpf_kick_cpu() from NMI silently drops the kick after a one-time warning. A dropped kick can leave a CPU idle when the scheduler believes it was woken, which is a correctness problem for the scheduler even if the kernel is fine. Now that scx_error() works from NMI, abort the scheduler instead so that the bug is surfaced deterministically. The warned_nmi_kick tracking is no longer needed. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
This commit is contained in:
@@ -9219,11 +9219,7 @@ void scx_kick_cpu(struct scx_sched *sch, s32 cpu, u64 flags)
|
||||
* not mask NMIs, so kicking from NMI could corrupt it and is unsupported.
|
||||
*/
|
||||
if (unlikely(in_nmi())) {
|
||||
if (!sch->warned_nmi_kick) {
|
||||
sch->warned_nmi_kick = true;
|
||||
pr_warn("sched_ext: %s: scx_bpf_kick_cpu() from NMI ignored\n",
|
||||
sch->ops.name);
|
||||
}
|
||||
scx_error(sch, "scx_bpf_kick_cpu() called from NMI");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1543,7 +1543,6 @@ struct scx_sched {
|
||||
*/
|
||||
bool warned_zero_slice:1;
|
||||
bool warned_unassoc_progs:1;
|
||||
bool warned_nmi_kick:1;
|
||||
|
||||
struct list_head all;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user