Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1567455 > unrolled thread
| Started by | Hardik H Bagdi <hbagdi1@binghamton.edu> |
|---|---|
| First post | 2017-01-26 15:20 +0100 |
| Last post | 2017-01-26 15:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
Understanding stop_machine() use for cpu_down() Hardik H Bagdi <hbagdi1@binghamton.edu> - 2017-01-26 15:20 +0100
| From | Hardik H Bagdi <hbagdi1@binghamton.edu> |
|---|---|
| Date | 2017-01-26 15:20 +0100 |
| Subject | Understanding stop_machine() use for cpu_down() |
| Message-ID | <t3T46-8qV-13@gated-at.bofh.it> |
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
Back to top | Article view | linux.kernel
csiph-web