]> git.baikalelectronics.ru Git - kernel.git/commit
Freezer: Introduce PF_FREEZER_NOSIG
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 11 Jun 2008 20:04:29 +0000 (22:04 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 16 Jul 2008 21:27:03 +0000 (23:27 +0200)
commit5d9265ca5efd65fb20857a83c544255a311b3110
tree55c08b82463ffd5b78a8bc4a4748261b02391593
parent68ef433f07869b19cfb11d130adf705a1ef93034
Freezer: Introduce PF_FREEZER_NOSIG

The freezer currently attempts to distinguish kernel threads from
user space tasks by checking if their mm pointer is unset and it
does not send fake signals to kernel threads.  However, there are
kernel threads, mostly related to networking, that behave like
user space tasks and may want to be sent a fake signal to be frozen.

Introduce the new process flag PF_FREEZER_NOSIG that will be set
by default for all kernel threads and make the freezer only send
fake signals to the tasks having PF_FREEZER_NOSIG unset.  Provide
the set_freezable_with_signal() function to be called by the kernel
threads that want to be sent a fake signal for freezing.

This patch should not change the freezer's observable behavior.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
include/linux/freezer.h
include/linux/sched.h
kernel/kthread.c
kernel/power/process.c