linux-stable-rt/fs
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
..
9p 9p: re-enable mount time debug option 2007-07-14 15:14:14 -05:00
adfs
affs
afs AFS: drop explicit extern 2007-07-16 09:05:43 -07:00
autofs
autofs4
befs
bfs
cifs Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
coda wrong order of arguments of ->readdir() 2007-07-15 16:40:51 -07:00
configfs configfs: config item dependancies. 2007-07-10 17:18:59 -07:00
cramfs
debugfs debugfs: add rename for debugfs files 2007-07-11 16:09:00 -07:00
devpts
dlm configfs: Convert subsystem semaphore to mutex 2007-07-10 17:10:56 -07:00
ecryptfs sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
efs
exportfs
ext2 ext2: statfs speed up 2007-07-16 09:05:52 -07:00
ext3 ext3: statfs speed up 2007-07-16 09:05:52 -07:00
ext4 ext4: statfs speed up 2007-07-16 09:05:52 -07:00
fat fat: Fix the race of read/write the FAT12 entry 2007-07-16 10:31:01 -07:00
freevxfs vxfs warning fixes 2007-07-16 09:05:41 -07:00
fuse
gfs2 Remove capability.h from mm.h 2007-07-16 09:05:45 -07:00
hfs
hfsplus HFS+: add custom dentry hash and comparison operations 2007-07-16 09:05:49 -07:00
hostfs
hpfs
hppfs
hugetlbfs hugetlbfs: handle empty options string 2007-07-16 09:05:46 -07:00
isofs remove useless tolower in isofs 2007-07-16 09:05:43 -07:00
jbd is_power_of_2(): jbd 2007-07-16 09:05:48 -07:00
jbd2 is_power_of_2(): jbd 2007-07-16 09:05:48 -07:00
jffs2 Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
jfs
lockd Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
minix
msdos
ncpfs Only send SIGXFSZ when exceeding rlimits. 2007-07-16 09:05:43 -07:00
nfs Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
nfs_common
nfsd Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
nls NLS: Remove obsolete Makefile entries 2007-07-16 09:05:52 -07:00
ntfs
ocfs2 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 2007-07-16 10:52:55 -07:00
openpromfs
partitions Fix LDM for new field in the VOL5 VBLK. 2007-07-16 12:01:30 -07:00
proc Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched 2007-07-16 11:02:49 -07:00
qnx4
ramfs Add __GFP_MOVABLE for callers to flag allocations from high memory that may be migrated 2007-07-17 10:22:59 -07:00
reiserfs Only send SIGXFSZ when exceeding rlimits. 2007-07-16 09:05:43 -07:00
romfs
smbfs
sysfs sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
sysv
udf UDF: fix function name from udf_crc16 to udf_crc 2007-07-16 09:05:51 -07:00
ufs is_power_of_2: ufs/super.c 2007-07-16 09:05:50 -07:00
vfat
xfs Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
Kconfig Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 2007-07-16 10:32:02 -07:00
Kconfig.binfmt
Makefile
aio.c
anon_inodes.c Fix trivial typos in anon_inodes.c comments 2007-07-16 09:05:52 -07:00
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c binfmt_elf warning fix 2007-07-16 09:05:47 -07:00
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c
block_dev.c bd_claim_by_disk: fix warning 2007-07-16 09:05:50 -07:00
buffer.c fs: introduce some page/buffer invariants 2007-07-17 10:23:02 -07:00
char_dev.c
compat.c
compat_ioctl.c compat32: ignore the LOOP_CLR_FD ioctl 2007-07-16 09:05:52 -07:00
dcache.c mm: clean up and kernelify shrinker registration 2007-07-17 10:23:00 -07:00
dcookies.c
direct-io.c
dnotify.c
dquot.c mm: clean up and kernelify shrinker registration 2007-07-17 10:23:00 -07:00
drop_caches.c invalidate_mapping_pages(): add cond_resched 2007-07-16 09:05:36 -07:00
eventfd.c
eventpoll.c
exec.c
fcntl.c
fifo.c
file.c
file_table.c
filesystems.c
fs-writeback.c
generic_acl.c
inode.c mm: clean up and kernelify shrinker registration 2007-07-17 10:23:00 -07:00
inotify.c
inotify_user.c
internal.h
ioctl.c drop obsolete sys_ioctl export 2007-07-16 09:05:48 -07:00
ioprio.c
libfs.c
locks.c
mbcache.c mm: clean up and kernelify shrinker registration 2007-07-17 10:23:00 -07:00
mpage.c
namei.c
namespace.c fs/namespace.c should #include "internal.h" 2007-07-16 09:05:50 -07:00
nfsctl.c
no-block.c
open.c O_CLOEXEC for SCM_RIGHTS 2007-07-16 09:05:45 -07:00
pipe.c
pnode.c
pnode.h
posix_acl.c
quota.c diskquota: 32bit quota tools on 64bit architectures 2007-07-16 09:05:48 -07:00
quota_v1.c
quota_v2.c
read_write.c
read_write.h
readdir.c
select.c
seq_file.c seq_file: more atomicity in traverse() 2007-07-16 09:05:45 -07:00
signalfd.c
splice.c splice: direct splicing updates ppos twice 2007-07-16 15:02:48 +02:00
stack.c
stat.c
super.c hugetlbfs: handle empty options string 2007-07-16 09:05:46 -07:00
sync.c
timerfd.c
utimes.c utime(s): Honour CAP_FOWNER when times==NULL 2007-07-16 12:14:08 -07:00
xattr.c
xattr_acl.c