android_kernel_samsung_msm8976/arch
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
..
alpha alpha: fix trivial section mismatch warnings 2007-07-16 09:05:37 -07:00
arm Merge branch 'ioat-md-accel-for-linus' of git://lost.foo-projects.org/~dwillia2/git/iop 2007-07-13 10:52:27 -07:00
arm26 Remove the last few UMSDOS leftovers 2007-07-16 09:05:51 -07:00
avr32 generic bug: use show_regs() instead of dump_stack() 2007-07-16 09:05:51 -07:00
blackfin Blackfin arch: add missing CONFIG_LARGE_ALLOCS when upstream merging 2007-07-12 14:55:05 +08:00
cris Remove the last few UMSDOS leftovers 2007-07-16 09:05:51 -07:00
frv FRV: Remove some dead code 2007-07-16 09:05:37 -07:00
h8300 dma-mapping: prevent dma dependent code from linking on !HAS_DMA archs 2007-07-16 09:05:45 -07:00
i386 Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
ia64 handle kernelcore=: generic 2007-07-17 10:22:59 -07:00
m32r dma-mapping: prevent dma dependent code from linking on !HAS_DMA archs 2007-07-16 09:05:45 -07:00
m68k x86_64: Quieten Atari keyboard warnings in Kconfig 2007-06-20 14:27:26 -07:00
m68knommu m68knommu: remove old cache management cruft from mm code 2007-07-16 09:05:37 -07:00
mips [MIPS] Make show_code static and add __user tag 2007-07-13 17:40:01 +01:00
parisc generic bug: use show_regs() instead of dump_stack() 2007-07-16 09:05:51 -07:00
powerpc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-07-16 17:58:08 -07:00
ppc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-07-16 17:58:08 -07:00
s390 generic bug: use show_regs() instead of dump_stack() 2007-07-16 09:05:51 -07:00
sh Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 2007-07-16 10:32:02 -07:00
sh64 sh64: Handle -ERESTART_RESTARTBLOCK for restartable syscalls. 2007-06-19 12:41:32 +09:00
sparc page table handling cleanup 2007-07-16 09:05:36 -07:00
sparc64 [SPARC64]: Fix race between MD update and dr-cpu add. 2007-07-16 17:11:59 -07:00
um uml: remove dead file 2007-07-16 09:05:39 -07:00
v850 all-archs: consolidate .data section definition in asm-generic 2007-05-19 09:11:57 +02:00
x86_64 generic bug: use show_regs() instead of dump_stack() 2007-07-16 09:05:51 -07:00
xtensa [XTENSA] Remove non-rt signal handling 2007-05-31 17:49:32 -07:00