aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-05-09 05:35:10 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:56 -0400
commit8bb7844286fb8c9fce6f65d8288aeb09d03a5e0d (patch)
treef4e305edaedbde05774bb1e4acd89a9475661d2e /Documentation
parentf37bc2712b54ec641e0c0c8634f1a4b61d9956c0 (diff)
Add suspend-related notifications for CPU hotplug
Since nonboot CPUs are now disabled after tasks and devices have been frozen and the CPU hotplug infrastructure is used for this purpose, we need special CPU hotplug notifications that will help the CPU-hotplug-aware subsystems distinguish normal CPU hotplug events from CPU hotplug events related to a system-wide suspend or resume operation in progress. This patch introduces such notifications and causes them to be used during suspend and resume transitions. It also changes all of the CPU-hotplug-aware subsystems to take these notifications into consideration (for now they are handled in the same way as the corresponding "normal" ones). [oleg@tv-sign.ru: cleanups] Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Gautham R Shenoy <ego@in.ibm.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/cpu-hotplug.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index cc60d29b954c..b6d24c22274b 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -217,14 +217,17 @@ Q: What happens when a CPU is being logically offlined?
217A: The following happen, listed in no particular order :-) 217A: The following happen, listed in no particular order :-)
218 218
219- A notification is sent to in-kernel registered modules by sending an event 219- A notification is sent to in-kernel registered modules by sending an event
220 CPU_DOWN_PREPARE 220 CPU_DOWN_PREPARE or CPU_DOWN_PREPARE_FROZEN, depending on whether or not the
221 CPU is being offlined while tasks are frozen due to a suspend operation in
222 progress
221- All process is migrated away from this outgoing CPU to a new CPU 223- All process is migrated away from this outgoing CPU to a new CPU
222- All interrupts targeted to this CPU is migrated to a new CPU 224- All interrupts targeted to this CPU is migrated to a new CPU
223- timers/bottom half/task lets are also migrated to a new CPU 225- timers/bottom half/task lets are also migrated to a new CPU
224- Once all services are migrated, kernel calls an arch specific routine 226- Once all services are migrated, kernel calls an arch specific routine
225 __cpu_disable() to perform arch specific cleanup. 227 __cpu_disable() to perform arch specific cleanup.
226- Once this is successful, an event for successful cleanup is sent by an event 228- Once this is successful, an event for successful cleanup is sent by an event
227 CPU_DEAD. 229 CPU_DEAD (or CPU_DEAD_FROZEN if tasks are frozen due to a suspend while the
230 CPU is being offlined).
228 231
229 "It is expected that each service cleans up when the CPU_DOWN_PREPARE 232 "It is expected that each service cleans up when the CPU_DOWN_PREPARE
230 notifier is called, when CPU_DEAD is called its expected there is nothing 233 notifier is called, when CPU_DEAD is called its expected there is nothing
@@ -242,9 +245,11 @@ A: This is what you would need in your kernel code to receive notifications.
242 245
243 switch (action) { 246 switch (action) {
244 case CPU_ONLINE: 247 case CPU_ONLINE:
248 case CPU_ONLINE_FROZEN:
245 foobar_online_action(cpu); 249 foobar_online_action(cpu);
246 break; 250 break;
247 case CPU_DEAD: 251 case CPU_DEAD:
252 case CPU_DEAD_FROZEN:
248 foobar_dead_action(cpu); 253 foobar_dead_action(cpu);
249 break; 254 break;
250 } 255 }