Skip to contentSkip to conversation

sched_ext: Drop spurious warning on kick during scheduler disable

PATCH In review Tejun Heo 2 participants 3 messages Apr 10 – Apr 11

Subsystems (2)
lore
Share & tools
lore

Tejun Heo

author reviewer
#0 lore raw

PATCH 1/1 sched_ext: Drop spurious warning on kick during scheduler disable

kick_cpus_irq_workfn() warns when scx_kick_syncs is NULL, but this can legitimately happen when a BPF timer or other kick source races with free_kick_syncs() during scheduler disable. Drop the pr_warn_once() and add a comment explaining the race.

---
 kernel/sched/ext.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
kernel/sched/ext.c +2 -3
index b8dbae251fd5..012ca8bd70fb 100644
@@ -7600,10 +7600,9 @@ static void kick_cpus_irq_workfn(struct irq_work *irq_work)
 	unsigned long *ksyncs;
 	s32 cpu;
 
-	if (unlikely(!ksyncs_pcpu)) {
-		pr_warn_once("kick_cpus_irq_workfn() called with NULL scx_kick_syncs");
+	/* can race with free_kick_syncs() during scheduler disable */
+	if (unlikely(!ksyncs_pcpu))
 		return;
-	}
 
 	ksyncs = rcu_dereference_bh(ksyncs_pcpu)->syncs;
 

--
2.53.0

author reviewer Applied
#2 lore raw

Applied to sched_ext/for-7.1 with your Reviewed-by tag.

Thanks.

--
tejun