Skip to content

Commit a28ab03

Browse files
author
Frederic Weisbecker
committed
rcu: Comment why callbacks migration can't wait for CPUHP_RCUTREE_PREP
The callbacks migration is performed through an explicit call from the hotplug control CPU right after the death of the target CPU and before proceeding with the CPUHP_ teardown functions. This is unusual but necessary and yet uncommented. Summarize the reason as explained in the changelog of: a58163d (rcu: Migrate callbacks earlier in the CPU-offline timeline) Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
1 parent 448e9f3 commit a28ab03

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

kernel/cpu.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,14 @@ static int takedown_cpu(unsigned int cpu)
13721372
cpuhp_bp_sync_dead(cpu);
13731373

13741374
tick_cleanup_dead_cpu(cpu);
1375+
1376+
/*
1377+
* Callbacks must be re-integrated right away to the RCU state machine.
1378+
* Otherwise an RCU callback could block a further teardown function
1379+
* waiting for its completion.
1380+
*/
13751381
rcutree_migrate_callbacks(cpu);
1382+
13761383
return 0;
13771384
}
13781385

0 commit comments

Comments
 (0)