lkml.org 
[lkml]   [2017]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectUnderstanding stop_machine() use for cpu_down()
Hi,

I'm trying to understand why stop_machine() is necessary for
cpu_down() operation.

I see that multi_cpu_stop() on every online cpu (which hogs the cpu
and then triggers state changes state)
and then, take_cpu_down is invoked on the outgoing cpu.
This happens by every cpu decrementing the msdata->thread_ack and last
one trigger a state change.

I'm trying to understand why is this necessary.

Is to wait for RCU grace period(s)?
If yes, what variable/struct is being protected and how does
stop_machine() help there?

I see there was a patch (https://lwn.net/Articles/538819/) but had
some issues with idle_loop.

Is there an alternative where the stop_machine would not be necessary?
Or more specifically, is there a reason why every CPU would need to stop?

Any help would be appreciated.

Thanks,
Hardik

\
 
 \ /
  Last update: 2017-01-26 15:14    [W:0.022 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site