1
linux/arch
Matt Helsley 83224b0837 container freezer: add TIF_FREEZE flag to all architectures
This patch series introduces a cgroup subsystem that utilizes the swsusp
freezer to freeze a group of tasks.  It's immediately useful for batch job
management scripts.  It should also be useful in the future for
implementing container checkpoint/restart.

The freezer subsystem in the container filesystem defines a cgroup file
named freezer.state.  Reading freezer.state will return the current state
of the cgroup.  Writing "FROZEN" to the state file will freeze all tasks
in the cgroup.  Subsequently writing "RUNNING" will unfreeze the tasks in
the cgroup.

* Examples of usage :

   # mkdir /containers/freezer
   # mount -t cgroup -ofreezer freezer  /containers
   # mkdir /containers/0
   # echo $some_pid > /containers/0/tasks

to get status of the freezer subsystem :

   # cat /containers/0/freezer.state
   RUNNING

to freeze all tasks in the container :

   # echo FROZEN > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   FREEZING
   # cat /containers/0/freezer.state
   FROZEN

to unfreeze all tasks in the container :

   # echo RUNNING > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   RUNNING

This patch:

The first step in making the refrigerator() available to all
architectures, even for those without power management.

The purpose of such a change is to be able to use the refrigerator() in a
new control group subsystem which will implement a control group freezer.

[akpm@linux-foundation.org: fix sparc]
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Acked-by: Pavel Machek <pavel@suse.cz>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Nigel Cunningham <nigel@tuxonice.net>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:33 -07:00
..
alpha container freezer: add TIF_FREEZE flag to all architectures 2008-10-20 08:52:33 -07:00
arm Merge branch 'personality' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2008-10-16 12:32:52 -07:00
avr32 container freezer: add TIF_FREEZE flag to all architectures 2008-10-20 08:52:33 -07:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6 2008-10-16 12:45:08 -07:00
cris Merge branch 'for-linus' of git://www.jni.nu/cris 2008-10-17 09:09:48 -07:00
frv FRV: Eliminate NULL test and memset after alloc_bootmem 2008-10-16 15:06:54 -07:00
h8300 container freezer: add TIF_FREEZE flag to all architectures 2008-10-20 08:52:33 -07:00
ia64 mm: cleanup to make remove_memory() arch-neutral 2008-10-20 08:50:25 -07:00
m32r Merge branch 'core-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-10-16 15:17:40 -07:00
m68k arch/m68k/mm/kmap.c: introduce missing kfree 2008-10-14 10:23:27 -07:00
m68knommu container freezer: add TIF_FREEZE flag to all architectures 2008-10-20 08:52:33 -07:00
mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2008-10-16 12:40:26 -07:00
mn10300 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-13 17:13:56 +01:00
parisc Merge branch 'personality' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2008-10-16 12:32:52 -07:00
powerpc mm: cleanup to make remove_memory() arch-neutral 2008-10-20 08:50:25 -07:00
s390 container freezer: add TIF_FREEZE flag to all architectures 2008-10-20 08:52:33 -07:00
sh [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
sparc container freezer: add TIF_FREEZE flag to all architectures 2008-10-20 08:52:33 -07:00
sparc64 sparc64: use iommu_num_pages function in IOMMU code 2008-10-16 11:21:33 -07:00
um uml: remove the dead TTY_LOG code 2008-10-16 11:21:30 -07:00
x86 mm: rewrite vmap layer 2008-10-20 08:52:32 -07:00
xtensa xtensa: remove dead CONFIG_BLK_DEV_IDE code 2008-10-13 21:39:34 +02:00
.gitignore
Kconfig Kconfig: eliminate "def_bool n" constructs 2008-10-16 11:21:31 -07:00