view Documentation/power/kernel_threads.txt @ 524:7f8b544237bf

netfront: Allow netfront in domain 0.

This is useful if your physical network device is in a utility domain.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Apr 15 15:18:58 2008 +0100 (2008-04-15)
parents 831230e53067
line source
4 Freezer
6 Upon entering a suspended state the system will freeze all
7 tasks. This is done by delivering pseudosignals. This affects
8 kernel threads, too. To successfully freeze a kernel thread
9 the thread has to check for the pseudosignal and enter the
10 refrigerator. Code to do this looks like this:
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));
18 from drivers/usb/core/hub.c::hub_thread()
21 The Unfreezable
23 Some kernel threads however, must not be frozen. The kernel must
24 be able to finish pending IO operations and later on be able to
25 write the memory image to disk. Kernel threads needed to do IO
26 must stay awake. Such threads must mark themselves unfreezable
27 like this:
29 /*
30 * This thread doesn't need any user-level access,
31 * so get rid of all our resources.
32 */
33 daemonize("usb-storage");
35 current->flags |= PF_NOFREEZE;
37 from drivers/usb/storage/usb.c::usb_stor_control_thread()
39 Such drivers are themselves responsible for staying quiet during
40 the actual snapshotting.