linux/drivers/char
Rafael J. Wysocki 8314418629 Freezer: make kernel threads nonfreezable by default
Currently, the freezer treats all tasks as freezable, except for the kernel
threads that explicitly set the PF_NOFREEZE flag for themselves.  This
approach is problematic, since it requires every kernel thread to either
set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
care for the freezing of tasks at all.

It seems better to only require the kernel threads that want to or need to
be frozen to use some freezer-related code and to remove any
freezer-related code from the other (nonfreezable) kernel threads, which is
done in this patch.

The patch causes all kernel threads to be nonfreezable by default (ie.  to
have PF_NOFREEZE set by default) and introduces the set_freezable()
function that should be called by the freezable kernel threads in order to
unset PF_NOFREEZE.  It also makes all of the currently freezable kernel
threads call set_freezable(), so it shouldn't cause any (intentional)
change of behaviour to appear.  Additionally, it updates documentation to
describe the freezing of tasks more accurately.

[akpm@linux-foundation.org: build fixes]
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Nigel Cunningham <nigel@nigel.suspend2.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-17 10:23:02 -07:00
..
agp
drm drm: add idr_init to drm_stub.c 2007-07-17 14:20:07 +10:00
hw_random intel-rng: undo mess made by an 80 column extremist 2007-07-16 09:05:46 -07:00
ip2 Char: ip2, use msleep for sleeping 2007-07-16 09:05:44 -07:00
ipmi drivers/char/ipmi/ipmi_si_intf.c: lower printk severity 2007-07-16 09:05:52 -07:00
mwave
pcmcia
rio
tpm Use menuconfig objects II - TPM 2007-07-16 09:05:40 -07:00
watchdog
.gitignore
ChangeLog
Kconfig undeprecate raw driver 2007-07-16 09:05:46 -07:00
Makefile Audit: add TTY input auditing 2007-07-16 09:05:47 -07:00
amiserial.c amiserial: remove incorrect 'no termios change' check 2007-07-16 09:05:51 -07:00
apm-emulation.c Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
applicom.c
applicom.h
briq_panel.c
cd1865.h
consolemap.c Kernel utf-8 handling 2007-07-16 09:05:46 -07:00
cp437.uni
cs5535_gpio.c
cyclades.c serial: remove termios checks from various old char serial drivers 2007-07-16 09:05:52 -07:00
decserial.c
defkeymap.c_shipped
defkeymap.map
digi1.h
digiFep1.h
digiPCI.h
ds1286.c
ds1302.c
ds1620.c
dsp56k.c
dtlk.c
ec3104_keyb.c
efirtc.c
epca.c
epca.h
epcaconfig.h
esp.c serial: remove termios checks from various old char serial drivers 2007-07-16 09:05:52 -07:00
generic_nvram.c
generic_serial.c genericserial: remove bogus optimisation check and dead code paths 2007-07-16 09:05:51 -07:00
genrtc.c Char: genrtc, use wait_event_interruptible 2007-07-16 09:05:44 -07:00
hangcheck-timer.c
hpet.c
hvc_beat.c
hvc_console.c Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
hvc_console.h
hvc_iseries.c
hvc_rtas.c
hvc_vio.c
hvcs.c
hvsi.c
i8k.c
ip27-rtc.c
isicom.c
istallion.c serial: remove termios checks from various old char serial drivers 2007-07-16 09:05:52 -07:00
keyboard.c Kernel utf-8 handling 2007-07-16 09:05:46 -07:00
lcd.c
lcd.h
lp.c
mbcs.c
mbcs.h
mem.c
misc.c Make /proc/misc use seq_list_xxx helpers 2007-07-16 09:05:42 -07:00
mmtimer.c
moxa.c
mspec.c mspec_mmap: don't set VM_LOCKED 2007-07-16 09:05:36 -07:00
mxser.c serial: remove termios checks from various old char serial drivers 2007-07-16 09:05:52 -07:00
mxser.h
mxser_new.c serial: remove termios checks from various old char serial drivers 2007-07-16 09:05:52 -07:00
mxser_new.h
n_hdlc.c Char: n_hdlc, allow RESTARTSYS retval of tty write 2007-07-16 09:05:43 -07:00
n_r3964.c Char: n_r3964, use wait_event_interruptible 2007-07-16 09:05:44 -07:00
n_tty.c Audit: add TTY input auditing 2007-07-16 09:05:47 -07:00
nsc_gpio.c
nvram.c COBALT: remove all references to Cobalt NVRAM 2007-07-16 09:05:47 -07:00
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
pty.c
random.c
raw.c
riscom8.c
riscom8.h
riscom8_reg.h
rocket.c rocket.c: fix unchecked mutex_lock_interruptible() 2007-07-16 09:05:43 -07:00
rocket.h
rocket_int.h
rtc.c RTC: Ratelimit "lost interrupts" message 2007-07-16 09:05:43 -07:00
scc.h
scx200_gpio.c
selection.c Kernel utf-8 handling 2007-07-16 09:05:46 -07:00
ser_a2232.c
ser_a2232.h
ser_a2232fw.ax
ser_a2232fw.h
serial167.c
snsc.c
snsc.h
snsc_event.c
sonypi.c remove sonypi_camera_command() 2007-07-16 09:05:46 -07:00
specialix.c
specialix_io8.h
stallion.c
sx.c
sx.h
sxboards.h
sxwindow.h
synclink.c synclink: remove bogus 'no change' termios optimisation from synclink drivers 2007-07-16 09:05:51 -07:00
synclink_gt.c synclink: remove bogus 'no change' termios optimisation from synclink drivers 2007-07-16 09:05:51 -07:00
synclinkmp.c synclink: remove bogus 'no change' termios optimisation from synclink drivers 2007-07-16 09:05:51 -07:00
sysrq.c
tb0219.c
tipar.c
tlclk.c
toshiba.c
tty_audit.c Audit: add TTY input auditing 2007-07-16 09:05:47 -07:00
tty_io.c Audit: add TTY input auditing 2007-07-16 09:05:47 -07:00
tty_ioctl.c Char: tty_ioctl, little whitespace cleanup 2007-07-16 09:05:44 -07:00
vc_screen.c
viocons.c
viotape.c
vme_scc.c
vr41xx_giu.c
vt.c
vt_ioctl.c