Skip to content

Commit 366237e

Browse files
committed
stop_machine: Provide RCU quiescent state in multi_cpu_stop()
When multi_cpu_stop() loops waiting for other tasks, it can trigger an RCU CPU stall warning. This can be misleading because what is instead needed is information on whatever task is blocking multi_cpu_stop(). This commit therefore inserts an RCU quiescent state into the multi_cpu_stop() function's waitloop. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent d38e6dc commit 366237e

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

include/linux/rcutree.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ void kfree_call_rcu(struct rcu_head *head, rcu_callback_t func);
3737

3838
void rcu_barrier(void);
3939
bool rcu_eqs_special_set(int cpu);
40+
void rcu_momentary_dyntick_idle(void);
4041
unsigned long get_state_synchronize_rcu(void);
4142
void cond_synchronize_rcu(unsigned long oldstate);
4243

kernel/rcu/tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ bool rcu_eqs_special_set(int cpu)
364364
*
365365
* The caller must have disabled interrupts and must not be idle.
366366
*/
367-
static void __maybe_unused rcu_momentary_dyntick_idle(void)
367+
void rcu_momentary_dyntick_idle(void)
368368
{
369369
int special;
370370

kernel/stop_machine.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ static int multi_cpu_stop(void *data)
233233
*/
234234
touch_nmi_watchdog();
235235
}
236+
rcu_momentary_dyntick_idle();
236237
} while (curstate != MULTI_STOP_EXIT);
237238

238239
local_irq_restore(flags);

0 commit comments

Comments
 (0)