]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - kernel/power/process.c
[PATCH] Cleanup patch for process freezing
authorChristoph Lameter <christoph@lameter.com>
Sat, 25 Jun 2005 06:13:50 +0000 (23:13 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 26 Jun 2005 00:10:13 +0000 (17:10 -0700)
commit3e1d1d28d99dabe63c64f7f40f1ca1d646de1f73
treed1e7c1e2e8902072042aefc3a7976b271cf76021
parentb3e112bcc19abd8e9657dca34a87316786e096f3
[PATCH] Cleanup patch for process freezing

1. Establish a simple API for process freezing defined in linux/include/sched.h:

   frozen(process) Check for frozen process
   freezing(process) Check if a process is being frozen
   freeze(process) Tell a process to freeze (go to refrigerator)
   thaw_process(process) Restart process
   frozen_process(process) Process is frozen now

2. Remove all references to PF_FREEZE and PF_FROZEN from all
   kernel sources except sched.h

3. Fix numerous locations where try_to_freeze is manually done by a driver

4. Remove the argument that is no longer necessary from two function calls.

5. Some whitespace cleanup

6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
   cleared before setting PF_FROZEN, recalc_sigpending does not check
   PF_FROZEN).

This patch does not address the problem of freeze_processes() violating the rule
that a task may only modify its own flags by setting PF_FREEZE. This is not clean
in an SMP environment. freeze(process) is therefore not SMP safe!

Signed-off-by: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
47 files changed:
Documentation/power/kernel_threads.txt
Documentation/power/swsusp.txt
arch/frv/kernel/signal.c
arch/h8300/kernel/signal.c
arch/i386/kernel/io_apic.c
arch/i386/kernel/signal.c
arch/m32r/kernel/signal.c
arch/ppc/kernel/signal.c
arch/x86_64/kernel/signal.c
drivers/block/pktcdvd.c
drivers/ieee1394/ieee1394_core.c
drivers/ieee1394/nodemgr.c
drivers/input/gameport/gameport.c
drivers/input/serio/serio.c
drivers/macintosh/therm_adt746x.c
drivers/md/md.c
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/video/msp3400.c
drivers/media/video/video-buf-dvb.c
drivers/net/8139too.c
drivers/net/irda/sir_kthread.c
drivers/net/irda/stir4200.c
drivers/net/wireless/airo.c
drivers/pcmcia/cs.c
drivers/pnp/pnpbios/core.c
drivers/usb/core/hub.c
drivers/usb/gadget/file_storage.c
drivers/usb/storage/usb.c
drivers/w1/w1.c
fs/afs/kafsasyncd.c
fs/afs/kafstimod.c
fs/jbd/journal.c
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_txnmgr.c
fs/lockd/clntproc.c
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_super.c
include/linux/sched.h
kernel/power/process.c
kernel/sched.c
kernel/signal.c
mm/pdflush.c
mm/vmscan.c
net/rxrpc/krxiod.c
net/rxrpc/krxsecd.c
net/rxrpc/krxtimod.c
net/sunrpc/svcsock.c