[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1716565961-18715-1-git-send-email-quic_mojha@quicinc.com>
Date: Fri, 24 May 2024 21:22:41 +0530
From: Mukesh Ojha <quic_mojha@...cinc.com>
To: <linux-kernel@...r.kernel.org>
CC: Mukesh Ojha <quic_mojha@...cinc.com>
Subject: [PATCH v2] stop_machine: Fix rcu_momentary_dyntick_idle() call in multi_cpu_stop()
rcu_momentary_dyntick_idle() is getting called from all the irq disable
path (mention doc section in rcu_momentary_dyntick_idle()) however, in
multi_cpu_stop() it is not called from irq disable path.
"
* Let the RCU core know that this CPU has gone through the scheduler,
* which is a quiescent state. This is called when the need for a
* quiescent state is urgent, so we burn an atomic operation and full
* memory barriers to let the RCU core know about it, regardless of what
* this CPU might (or might not) do in the near future.
*
* We inform the RCU core by emulating a zero-duration dyntick-idle period.
*
* The caller must have disabled interrupts and must not be idle.
"
Signed-off-by: Mukesh Ojha <quic_mojha@...cinc.com>
Acked-by: Paul E. McKenney <paulmck@...nel.org>
---
Change in v2: https://lore.kernel.org/lkml/1712649736-27058-1-git-send-email-quic_mojha@quicinc.com/
- Removed the unnecessary stack trace posted.
kernel/stop_machine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index cedb17ba158a..f93e6deb8150 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -250,8 +250,8 @@ static int multi_cpu_stop(void *data)
* be detected and reported on their side.
*/
touch_nmi_watchdog();
+ rcu_momentary_dyntick_idle();
}
- rcu_momentary_dyntick_idle();
} while (curstate != MULTI_STOP_EXIT);
local_irq_restore(flags);
--
2.7.4
Powered by blists - more mailing lists