aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power/kernel_threads.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/power/kernel_threads.txt')
-rw-r--r--Documentation/power/kernel_threads.txt40
1 files changed, 0 insertions, 40 deletions
diff --git a/Documentation/power/kernel_threads.txt b/Documentation/power/kernel_threads.txt
deleted file mode 100644
index fb57784986b1..000000000000
--- a/Documentation/power/kernel_threads.txt
+++ /dev/null
@@ -1,40 +0,0 @@
1KERNEL THREADS
2
3
4Freezer
5
6Upon entering a suspended state the system will freeze all
7tasks. This is done by delivering pseudosignals. This affects
8kernel threads, too. To successfully freeze a kernel thread
9the thread has to check for the pseudosignal and enter the
10refrigerator. Code to do this looks like this:
11
12 do {
13 hub_events();
14 wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list));
15 try_to_freeze();
16 } while (!signal_pending(current));
17
18from drivers/usb/core/hub.c::hub_thread()
19
20
21The Unfreezable
22
23Some kernel threads however, must not be frozen. The kernel must
24be able to finish pending IO operations and later on be able to
25write the memory image to disk. Kernel threads needed to do IO
26must stay awake. Such threads must mark themselves unfreezable
27like this:
28
29 /*
30 * This thread doesn't need any user-level access,
31 * so get rid of all our resources.
32 */
33 daemonize("usb-storage");
34
35 current->flags |= PF_NOFREEZE;
36
37from drivers/usb/storage/usb.c::usb_stor_control_thread()
38
39Such drivers are themselves responsible for staying quiet during
40the actual snapshotting.