All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu: Put the irq work into hard interrupt context for execution
@ 2022-03-30  6:00 Zqiang
  2022-03-30 20:16 ` Paul E. McKenney
  0 siblings, 1 reply; 8+ messages in thread
From: Zqiang @ 2022-03-30  6:00 UTC (permalink / raw)
  To: paulmck, frederic; +Cc: rcu, linux-kernel

In PREEMPT_RT kernel, if irq work flags is not set, it will be
executed in per-CPU irq_work kthreads. set IRQ_WORK_HARD_IRQ flags
to irq work, put it in the context of hard interrupt execution,
accelerate scheduler to re-evaluate.

Signed-off-by: Zqiang <qiang1.zhang@intel.com>
---
 kernel/rcu/tree.c        | 2 +-
 kernel/rcu/tree_plugin.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index e2ffbeceba69..a69587773a85 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -678,7 +678,7 @@ static void late_wakeup_func(struct irq_work *work)
 }
 
 static DEFINE_PER_CPU(struct irq_work, late_wakeup_work) =
-	IRQ_WORK_INIT(late_wakeup_func);
+	IRQ_WORK_INIT_HARD(late_wakeup_func);
 
 /*
  * If either:
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 3037c2536e1f..cf7bd28af8ef 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -661,7 +661,7 @@ static void rcu_read_unlock_special(struct task_struct *t)
 			    expboost && !rdp->defer_qs_iw_pending && cpu_online(rdp->cpu)) {
 				// Get scheduler to re-evaluate and call hooks.
 				// If !IRQ_WORK, FQS scan will eventually IPI.
-				init_irq_work(&rdp->defer_qs_iw, rcu_preempt_deferred_qs_handler);
+				rdp->defer_qs_iw = IRQ_WORK_INIT_HARD(rcu_preempt_deferred_qs_handler);
 				rdp->defer_qs_iw_pending = true;
 				irq_work_queue_on(&rdp->defer_qs_iw, rdp->cpu);
 			}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-03  3:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30  6:00 [PATCH] rcu: Put the irq work into hard interrupt context for execution Zqiang
2022-03-30 20:16 ` Paul E. McKenney
2022-03-30 22:47   ` Zhang, Qiang1
2022-03-31 17:29     ` Paul E. McKenney
2022-04-01  1:55       ` Zhang, Qiang1
2022-04-01 16:55         ` Paul E. McKenney
2022-04-02  6:29           ` Zhang, Qiang1
2022-04-03  3:40             ` Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.