From 17e02e08fcdb0c4e40996aa335e312cf35cb404d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 6 Oct 2021 13:18:49 +0200 Subject: [PATCH 052/158] sched/rt: Annotate the RT balancing logic irqwork as IRQ_WORK_HARD_IRQ The push-IPI logic for RT tasks expects to be invoked from hardirq context. One reason is that a RT task on the remote CPU would block the softirq processing on PREEMPT_RT and so avoid pulling / balancing the RT tasks as intended. Annotate root_domain::rto_push_work as IRQ_WORK_HARD_IRQ. Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc: Daniel Bristot de Oliveira Signed-off-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20211006111852.1514359-2-bigeasy@linutronix.de --- kernel/sched/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-5.15.19-rt29/kernel/sched/topology.c =================================================================== --- linux-5.15.19-rt29.orig/kernel/sched/topology.c +++ linux-5.15.19-rt29/kernel/sched/topology.c @@ -526,7 +526,7 @@ static int init_rootdomain(struct root_d #ifdef HAVE_RT_PUSH_IPI rd->rto_cpu = -1; raw_spin_lock_init(&rd->rto_lock); - init_irq_work(&rd->rto_push_work, rto_push_irq_work_func); + rd->rto_push_work = IRQ_WORK_INIT_HARD(rto_push_irq_work_func); #endif rd->visit_gen = 0;