Skip to content

Commit 05ef9e9

Browse files
joelagnelpaulmckrcu
authored andcommitted
rcu: Ensure that ->rcu_urgent_qs is set before resched IPI
The RCU-specific resched_cpu() function sends a resched IPI to the specified CPU, which can be used to force the tick on for a given nohz_full CPU. This is needed when this nohz_full CPU is looping in the kernel while blocking the current grace period. However, for the tick to actually be forced on in all cases, that CPU's rcu_data structure's ->rcu_urgent_qs flag must be set beforehand. This commit therefore causes rcu_implicit_dynticks_qs() to set this flag prior to invoking resched_cpu() on a holdout nohz_full CPU. Signed-off-by: Joel Fernandes (Google) <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 5a64466 commit 05ef9e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/rcu/tree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
10731073
if (tick_nohz_full_cpu(rdp->cpu) &&
10741074
time_after(jiffies,
10751075
READ_ONCE(rdp->last_fqs_resched) + jtsq * 3)) {
1076+
WRITE_ONCE(*ruqp, true);
10761077
resched_cpu(rdp->cpu);
10771078
WRITE_ONCE(rdp->last_fqs_resched, jiffies);
10781079
}

0 commit comments

Comments
 (0)