* [PATCH 1/4] Container Freezer: Add TIF_FREEZE flag to all architectures
[not found] <20080403001529.052250759@us.ibm.com>
@ 2008-04-03 0:15 ` Matt Helsley
2008-04-03 0:15 ` [PATCH 2/4] Container Freezer: Make refrigerator always available Matt Helsley
` (4 subsequent siblings)
5 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-04-03 0:15 UTC (permalink / raw)
To: Linux-Kernel; +Cc: linux-pm, Cedric Le Goater
[-- Attachment #1: cgroup-freezer/cgroup-freezer-add-the-tif-freeze-flag-to-all-archs.patch --]
[-- Type: text/plain, Size: 12189 bytes --]
This patch is 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.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Cc: linux-pm@lists.linux-foundation.org
---
include/asm-alpha/thread_info.h | 2 ++
include/asm-avr32/thread_info.h | 2 ++
include/asm-cris/thread_info.h | 2 ++
include/asm-h8300/thread_info.h | 2 ++
include/asm-m68k/thread_info.h | 1 +
include/asm-m68knommu/thread_info.h | 2 ++
include/asm-parisc/thread_info.h | 2 ++
include/asm-s390/thread_info.h | 2 ++
include/asm-sparc/thread_info.h | 2 ++
include/asm-sparc64/thread_info.h | 2 ++
include/asm-um/thread_info.h | 2 ++
include/asm-v850/thread_info.h | 2 ++
include/asm-xtensa/thread_info.h | 2 ++
13 files changed, 25 insertions(+)
Index: 2.6.25-rc3-mm1/include/asm-alpha/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-alpha/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-alpha/thread_info.h
@@ -76,12 +76,14 @@ register struct thread_info *__current_t
#define TIF_UAC_SIGBUS 7
#define TIF_MEMDIE 8
#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */
+#define TIF_FREEZE 19 /* is freezing for suspend */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
/* Work to do on interrupt/exception return. */
#define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
Index: 2.6.25-rc3-mm1/include/asm-avr32/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-avr32/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-avr32/thread_info.h
@@ -88,6 +88,7 @@ static inline struct thread_info *curren
#define TIF_MEMDIE 6
#define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal */
#define TIF_CPU_GOING_TO_SLEEP 8 /* CPU is entering sleep 0 mode */
+#define TIF_FREEZE 19 /* is freezing for suspend */
#define TIF_DEBUG 30 /* debugging enabled */
#define TIF_USERSPACE 31 /* true if FS sets userspace */
@@ -99,6 +100,7 @@ static inline struct thread_info *curren
#define _TIF_MEMDIE (1 << TIF_MEMDIE)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
#define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP)
+#define _TIF_FREEZE (1 << TIF_FREEZE)
/* Note: The masks below must never span more than 16 bits! */
Index: 2.6.25-rc3-mm1/include/asm-cris/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-cris/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-cris/thread_info.h
@@ -86,6 +86,7 @@ struct thread_info {
#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
#define TIF_MEMDIE 17
+#define TIF_FREEZE 19 /* is freezing for suspend */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
@@ -93,6 +94,7 @@ struct thread_info {
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
Index: 2.6.25-rc3-mm1/include/asm-h8300/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-h8300/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-h8300/thread_info.h
@@ -92,6 +92,7 @@ static inline struct thread_info *curren
TIF_NEED_RESCHED */
#define TIF_MEMDIE 4
#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
+#define TIF_FREEZE 19 /* is freezing for suspend */
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
@@ -99,6 +100,7 @@ static inline struct thread_info *curren
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
Index: 2.6.25-rc3-mm1/include/asm-m68k/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-m68k/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-m68k/thread_info.h
@@ -58,5 +58,6 @@ struct thread_info {
#define TIF_DELAYED_TRACE 14 /* single step a syscall */
#define TIF_SYSCALL_TRACE 15 /* syscall trace active */
#define TIF_MEMDIE 16
+#define TIF_FREEZE 19
#endif /* _ASM_M68K_THREAD_INFO_H */
Index: 2.6.25-rc3-mm1/include/asm-m68knommu/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-m68knommu/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-m68knommu/thread_info.h
@@ -88,12 +88,14 @@ static inline struct thread_info *curren
#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
TIF_NEED_RESCHED */
#define TIF_MEMDIE 4
+#define TIF_FREEZE 19 /* is freezing for suspend */
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
Index: 2.6.25-rc3-mm1/include/asm-parisc/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-parisc/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-parisc/thread_info.h
@@ -62,6 +62,7 @@ struct thread_info {
#define TIF_32BIT 4 /* 32 bit binary */
#define TIF_MEMDIE 5
#define TIF_RESTORE_SIGMASK 6 /* restore saved signal mask */
+#define TIF_FREEZE 19 /* is freezing for suspend */
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
@@ -69,6 +70,7 @@ struct thread_info {
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
#define _TIF_32BIT (1 << TIF_32BIT)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
+#define _TIF_FREEZE (1 << TIF_FREEZE)
#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | \
_TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK)
Index: 2.6.25-rc3-mm1/include/asm-s390/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-s390/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-s390/thread_info.h
@@ -101,6 +101,7 @@ static inline struct thread_info *curren
TIF_NEED_RESCHED */
#define TIF_31BIT 18 /* 32bit process */
#define TIF_MEMDIE 19
+#define TIF_FREEZE 20 /* is freezing for suspend */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
@@ -113,6 +114,7 @@ static inline struct thread_info *curren
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_31BIT (1<<TIF_31BIT)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#endif /* __KERNEL__ */
Index: 2.6.25-rc3-mm1/include/asm-sparc/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-sparc/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-sparc/thread_info.h
@@ -137,6 +137,7 @@ BTFIXUPDEF_CALL(void, free_thread_info,
#define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling
* TIF_NEED_RESCHED */
#define TIF_MEMDIE 10
+#define TIF_FREEZE 19 /* is freezing for suspend */
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
@@ -145,6 +146,7 @@ BTFIXUPDEF_CALL(void, free_thread_info,
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#endif /* __KERNEL__ */
Index: 2.6.25-rc3-mm1/include/asm-sparc64/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-sparc64/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-sparc64/thread_info.h
@@ -236,6 +236,7 @@ register struct thread_info *current_thr
#define TIF_ABI_PENDING 12
#define TIF_MEMDIE 13
#define TIF_POLLING_NRFLAG 14
+#define TIF_FREEZE 19 /* is freezing for suspend */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
@@ -249,6 +250,7 @@ register struct thread_info *current_thr
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \
(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | \
Index: 2.6.25-rc3-mm1/include/asm-um/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-um/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-um/thread_info.h
@@ -83,6 +83,7 @@ static inline struct thread_info *curren
#define TIF_MEMDIE 5
#define TIF_SYSCALL_AUDIT 6
#define TIF_RESTORE_SIGMASK 7
+#define TIF_FREEZE 19 /* is freezing for suspend */
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
@@ -91,5 +92,6 @@ static inline struct thread_info *curren
#define _TIF_MEMDIE (1 << TIF_MEMDIE)
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
+#define _TIF_FREEZE (1 << TIF_FREEZE)
#endif
Index: 2.6.25-rc3-mm1/include/asm-v850/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-v850/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-v850/thread_info.h
@@ -82,12 +82,14 @@ struct thread_info {
#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
TIF_NEED_RESCHED */
#define TIF_MEMDIE 4
+#define TIF_FREEZE 19 /* is freezing for suspend */
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
/* Size of kernel stack for each process. */
Index: 2.6.25-rc3-mm1/include/asm-xtensa/thread_info.h
===================================================================
--- 2.6.25-rc3-mm1.orig/include/asm-xtensa/thread_info.h
+++ 2.6.25-rc3-mm1/include/asm-xtensa/thread_info.h
@@ -138,6 +138,7 @@ static inline struct thread_info *curren
#define TIF_MEMDIE 5
#define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
+#define TIF_FREEZE 19 /* is freezing for suspend */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
@@ -146,6 +147,7 @@ static inline struct thread_info *curren
#define _TIF_IRET (1<<TIF_IRET)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
--
--
^ permalink raw reply [flat|nested] 37+ messages in thread* [PATCH 2/4] Container Freezer: Make refrigerator always available
[not found] <20080403001529.052250759@us.ibm.com>
2008-04-03 0:15 ` [PATCH 1/4] Container Freezer: Add TIF_FREEZE flag to all architectures Matt Helsley
@ 2008-04-03 0:15 ` Matt Helsley
2008-04-03 0:15 ` [PATCH 3/4] Container Freezer: Implement freezer cgroup subsystem Matt Helsley
` (3 subsequent siblings)
5 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-04-03 0:15 UTC (permalink / raw)
To: Linux-Kernel; +Cc: linux-pm, Cedric Le Goater
[-- Attachment #1: cgroup-freezer/cgroup-freezer-make-refrigerator-available-to-all-archs.patch --]
[-- Type: text/plain, Size: 10418 bytes --]
Now that the TIF_FREEZE flag is available in all architectures,
extract the refrigerator() and freeze_task() from kernel/power/process.c
and make it available to all.
The refrigerator() can now be used in a control group subsystem
implementing a control group freezer.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Cc: linux-pm@lists.linux-foundation.org
---
Changelog:
Merged Roland's "STOPPED is frozen enough" changes. For details see:
http://lkml.org/lkml/2008/3/3/676
include/linux/freezer.h | 19 ++-----
kernel/Makefile | 2
kernel/freezer.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++
kernel/power/process.c | 113 -------------------------------------------
4 files changed, 132 insertions(+), 126 deletions(-)
Index: linux-2.6.25-rc8-mm1/include/linux/freezer.h
===================================================================
--- linux-2.6.25-rc8-mm1.orig/include/linux/freezer.h
+++ linux-2.6.25-rc8-mm1/include/linux/freezer.h
@@ -4,11 +4,10 @@
#define FREEZER_H_INCLUDED
#include <linux/sched.h>
#include <linux/wait.h>
-#ifdef CONFIG_PM_SLEEP
/*
* Check if a process has been frozen
*/
static inline int frozen(struct task_struct *p)
{
@@ -61,22 +60,27 @@ static inline int thaw_process(struct ta
task_unlock(p);
return 0;
}
extern void refrigerator(void);
-extern int freeze_processes(void);
-extern void thaw_processes(void);
static inline int try_to_freeze(void)
{
if (freezing(current)) {
refrigerator();
return 1;
} else
return 0;
}
+extern int freeze_task(struct task_struct *p, int with_mm_only);
+
+#ifdef CONFIG_PM_SLEEP
+
+extern int freeze_processes(void);
+extern void thaw_processes(void);
+
/*
* The PF_FREEZER_SKIP flag should be set by a vfork parent right before it
* calls wait_for_completion(&vfork) and reset right after it returns from this
* function. Next, the parent should call try_to_freeze() to freeze itself
* appropriately in case the child has exited before the freezing of tasks is
@@ -156,22 +160,13 @@ static inline void set_freezable(void)
__retval); \
} while (try_to_freeze()); \
__retval; \
})
#else /* !CONFIG_PM_SLEEP */
-static inline int frozen(struct task_struct *p) { return 0; }
-static inline int freezing(struct task_struct *p) { return 0; }
-static inline void set_freeze_flag(struct task_struct *p) {}
-static inline void clear_freeze_flag(struct task_struct *p) {}
-static inline int thaw_process(struct task_struct *p) { return 1; }
-
-static inline void refrigerator(void) {}
static inline int freeze_processes(void) { BUG(); return 0; }
static inline void thaw_processes(void) {}
-static inline int try_to_freeze(void) { return 0; }
-
static inline void freezer_do_not_count(void) {}
static inline void freezer_count(void) {}
static inline int freezer_should_skip(struct task_struct *p) { return 0; }
static inline void set_freezable(void) {}
Index: linux-2.6.25-rc8-mm1/kernel/Makefile
===================================================================
--- linux-2.6.25-rc8-mm1.orig/kernel/Makefile
+++ linux-2.6.25-rc8-mm1/kernel/Makefile
@@ -7,11 +7,11 @@ obj-y = sched.o fork.o exec_domain.o
sysctl.o capability.o ptrace.o timer.o user.o \
signal.o sys.o kmod.o workqueue.o pid.o \
rcupdate.o extable.o params.o posix-timers.o \
kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
- notifier.o ksysfs.o pm_qos_params.o
+ notifier.o ksysfs.o pm_qos_params.o freezer.o
obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-y += time/
obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o
Index: linux-2.6.25-rc8-mm1/kernel/freezer.c
===================================================================
--- /dev/null
+++ linux-2.6.25-rc8-mm1/kernel/freezer.c
@@ -0,0 +1,124 @@
+/*
+ * kernel/freezer.c - Function to freeze a process
+ *
+ * Originally from kernel/power/process.c
+ */
+
+#include <linux/interrupt.h>
+#include <linux/suspend.h>
+#include <linux/module.h>
+#include <linux/syscalls.h>
+#include <linux/freezer.h>
+
+/*
+ * freezing is complete, mark current process as frozen
+ */
+static inline void frozen_process(void)
+{
+ if (!unlikely(current->flags & PF_NOFREEZE)) {
+ current->flags |= PF_FROZEN;
+ wmb();
+ }
+ clear_freeze_flag(current);
+}
+
+/* Refrigerator is place where frozen processes are stored :-). */
+void refrigerator(void)
+{
+ /* Hmm, should we be allowed to suspend when there are realtime
+ processes around? */
+ long save;
+
+ task_lock(current);
+ if (freezing(current)) {
+ frozen_process();
+ task_unlock(current);
+ } else {
+ task_unlock(current);
+ return;
+ }
+ save = current->state;
+ pr_debug("%s entered refrigerator\n", current->comm);
+
+ spin_lock_irq(¤t->sighand->siglock);
+ recalc_sigpending(); /* We sent fake signal, clean it up */
+ spin_unlock_irq(¤t->sighand->siglock);
+
+ for (;;) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ if (!frozen(current))
+ break;
+ schedule();
+ }
+ pr_debug("%s left refrigerator\n", current->comm);
+ __set_current_state(save);
+}
+EXPORT_SYMBOL(refrigerator);
+
+static void fake_signal_wake_up(struct task_struct *p)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&p->sighand->siglock, flags);
+ signal_wake_up(p, 0);
+ spin_unlock_irqrestore(&p->sighand->siglock, flags);
+}
+
+static int has_mm(struct task_struct *p)
+{
+ return (p->mm && !(p->flags & PF_BORROWED_MM));
+}
+
+/**
+ * freeze_task - send a freeze request to given task
+ * @p: task to send the request to
+ * @with_mm_only: if set, the request will only be sent if the task has its
+ * own mm
+ * Return value: 0, if @with_mm_only is set and the task has no mm of its
+ * own or the task is frozen, 1, otherwise
+ *
+ * The freeze request is sent by seting the tasks's TIF_FREEZE flag and
+ * either sending a fake signal to it or waking it up, depending on whether
+ * or not it has its own mm (ie. it is a user land task). If @with_mm_only
+ * is set and the task has no mm of its own (ie. it is a kernel thread),
+ * its TIF_FREEZE flag should not be set.
+ *
+ * The task_lock() is necessary to prevent races with exit_mm() or
+ * use_mm()/unuse_mm() from occuring.
+ */
+int freeze_task(struct task_struct *p, int with_mm_only)
+{
+ int ret = 1;
+
+ task_lock(p);
+ if (freezing(p)) {
+ if (has_mm(p)) {
+ if (!signal_pending(p))
+ fake_signal_wake_up(p);
+ } else {
+ if (with_mm_only)
+ ret = 0;
+ else
+ wake_up_state(p, TASK_INTERRUPTIBLE);
+ }
+ } else {
+ rmb();
+ if (frozen(p)) {
+ ret = 0;
+ } else {
+ if (has_mm(p)) {
+ set_freeze_flag(p);
+ fake_signal_wake_up(p);
+ } else {
+ if (with_mm_only) {
+ ret = 0;
+ } else {
+ set_freeze_flag(p);
+ wake_up_state(p, TASK_INTERRUPTIBLE);
+ }
+ }
+ }
+ }
+ task_unlock(p);
+ return ret;
+}
Index: linux-2.6.25-rc8-mm1/kernel/power/process.c
===================================================================
--- linux-2.6.25-rc8-mm1.orig/kernel/power/process.c
+++ linux-2.6.25-rc8-mm1/kernel/power/process.c
@@ -29,121 +29,10 @@ static inline int freezeable(struct task
(p->exit_state != 0))
return 0;
return 1;
}
-/*
- * freezing is complete, mark current process as frozen
- */
-static inline void frozen_process(void)
-{
- if (!unlikely(current->flags & PF_NOFREEZE)) {
- current->flags |= PF_FROZEN;
- wmb();
- }
- clear_freeze_flag(current);
-}
-
-/* Refrigerator is place where frozen processes are stored :-). */
-void refrigerator(void)
-{
- /* Hmm, should we be allowed to suspend when there are realtime
- processes around? */
- long save;
-
- task_lock(current);
- if (freezing(current)) {
- frozen_process();
- task_unlock(current);
- } else {
- task_unlock(current);
- return;
- }
- save = current->state;
- pr_debug("%s entered refrigerator\n", current->comm);
-
- spin_lock_irq(¤t->sighand->siglock);
- recalc_sigpending(); /* We sent fake signal, clean it up */
- spin_unlock_irq(¤t->sighand->siglock);
-
- for (;;) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- if (!frozen(current))
- break;
- schedule();
- }
- pr_debug("%s left refrigerator\n", current->comm);
- __set_current_state(save);
-}
-
-static void fake_signal_wake_up(struct task_struct *p)
-{
- unsigned long flags;
-
- spin_lock_irqsave(&p->sighand->siglock, flags);
- signal_wake_up(p, 0);
- spin_unlock_irqrestore(&p->sighand->siglock, flags);
-}
-
-static int has_mm(struct task_struct *p)
-{
- return (p->mm && !(p->flags & PF_BORROWED_MM));
-}
-
-/**
- * freeze_task - send a freeze request to given task
- * @p: task to send the request to
- * @with_mm_only: if set, the request will only be sent if the task has its
- * own mm
- * Return value: 0, if @with_mm_only is set and the task has no mm of its
- * own or the task is frozen, 1, otherwise
- *
- * The freeze request is sent by seting the tasks's TIF_FREEZE flag and
- * either sending a fake signal to it or waking it up, depending on whether
- * or not it has its own mm (ie. it is a user land task). If @with_mm_only
- * is set and the task has no mm of its own (ie. it is a kernel thread),
- * its TIF_FREEZE flag should not be set.
- *
- * The task_lock() is necessary to prevent races with exit_mm() or
- * use_mm()/unuse_mm() from occuring.
- */
-static int freeze_task(struct task_struct *p, int with_mm_only)
-{
- int ret = 1;
-
- task_lock(p);
- if (freezing(p)) {
- if (has_mm(p)) {
- if (!signal_pending(p))
- fake_signal_wake_up(p);
- } else {
- if (with_mm_only)
- ret = 0;
- else
- wake_up_state(p, TASK_INTERRUPTIBLE);
- }
- } else {
- rmb();
- if (frozen(p)) {
- ret = 0;
- } else {
- if (has_mm(p)) {
- set_freeze_flag(p);
- fake_signal_wake_up(p);
- } else {
- if (with_mm_only) {
- ret = 0;
- } else {
- set_freeze_flag(p);
- wake_up_state(p, TASK_INTERRUPTIBLE);
- }
- }
- }
- }
- task_unlock(p);
- return ret;
-}
static void cancel_freezing(struct task_struct *p)
{
unsigned long flags;
@@ -274,7 +163,5 @@ void thaw_processes(void)
thaw_tasks(FREEZER_KERNEL_THREADS);
thaw_tasks(FREEZER_USER_SPACE);
schedule();
printk("done.\n");
}
-
-EXPORT_SYMBOL(refrigerator);
--
^ permalink raw reply [flat|nested] 37+ messages in thread* [PATCH 3/4] Container Freezer: Implement freezer cgroup subsystem
[not found] <20080403001529.052250759@us.ibm.com>
2008-04-03 0:15 ` [PATCH 1/4] Container Freezer: Add TIF_FREEZE flag to all architectures Matt Helsley
2008-04-03 0:15 ` [PATCH 2/4] Container Freezer: Make refrigerator always available Matt Helsley
@ 2008-04-03 0:15 ` Matt Helsley
2008-04-03 0:15 ` [PATCH 4/4] Container Freezer: Skip frozen cgroups during power management resume Matt Helsley
` (2 subsequent siblings)
5 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-04-03 0:15 UTC (permalink / raw)
To: Linux-Kernel; +Cc: linux-pm, Cedric Le Goater
[-- Attachment #1: cgroup-freezer/cgroup-freezer-implement-freezer-subsystem.patch --]
[-- Type: text/plain, Size: 10610 bytes --]
This patch implements a new freezer subsystem for Paul Menage's
control groups framework. It provides a way to stop and resume
execution of all tasks in a cgroup by writing in the cgroup
filesystem.
This is the basic mechanism which should do the right thing for
user space tasks in a simple scenario. This will require more work
to get the freezing right (cf. try_to_freeze_tasks()) for ptraced
tasks.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Cc: linux-pm@lists.linux-foundation.org
---
include/linux/cgroup_freezer.h | 57 ++++++++
include/linux/cgroup_subsys.h | 6
init/Kconfig | 7 +
kernel/Makefile | 1
kernel/cgroup_freezer.c | 280 +++++++++++++++++++++++++++++++++++++++++
kernel/freezer.c | 1
6 files changed, 352 insertions(+)
Index: linux-2.6.25-rc8-mm1/include/linux/cgroup_freezer.h
===================================================================
--- /dev/null
+++ linux-2.6.25-rc8-mm1/include/linux/cgroup_freezer.h
@@ -0,0 +1,57 @@
+#ifndef _LINUX_CGROUP_FREEZER_H
+#define _LINUX_CGROUP_FREEZER_H
+/*
+ * cgroup_freezer.h - control group freezer subsystem interface
+ *
+ * Copyright IBM Corp. 2007
+ *
+ * Author : Cedric Le Goater <clg@fr.ibm.com>
+ */
+
+#include <linux/cgroup.h>
+
+#ifdef CONFIG_CGROUP_FREEZER
+
+enum freezer_state {
+ STATE_RUNNING = 0,
+ STATE_FREEZING,
+ STATE_FROZEN,
+};
+
+struct freezer {
+ struct cgroup_subsys_state css;
+ enum freezer_state state;
+ spinlock_t lock;
+};
+
+static inline struct freezer *cgroup_freezer(
+ struct cgroup *cgroup)
+{
+ return container_of(
+ cgroup_subsys_state(cgroup, freezer_subsys_id),
+ struct freezer, css);
+}
+
+static inline int cgroup_frozen(struct task_struct *task)
+{
+ struct cgroup *cgroup = task_cgroup(task, freezer_subsys_id);
+ struct freezer *freezer = cgroup_freezer(cgroup);
+ enum freezer_state state;
+
+ spin_lock(&freezer->lock);
+ state = freezer->state;
+ spin_unlock(&freezer->lock);
+
+ return (state == STATE_FROZEN);
+}
+
+#else /* !CONFIG_CGROUP_FREEZER */
+
+static inline int cgroup_frozen(struct task_struct *task)
+{
+ return 0;
+}
+
+#endif /* !CONFIG_CGROUP_FREEZER */
+
+#endif /* _LINUX_CGROUP_FREEZER_H */
Index: linux-2.6.25-rc8-mm1/include/linux/cgroup_subsys.h
===================================================================
--- linux-2.6.25-rc8-mm1.orig/include/linux/cgroup_subsys.h
+++ linux-2.6.25-rc8-mm1/include/linux/cgroup_subsys.h
@@ -46,5 +46,11 @@ SUBSYS(mem_cgroup)
#ifdef CONFIG_CGROUP_DEVICE
SUBSYS(devices)
#endif
/* */
+
+#ifdef CONFIG_CGROUP_FREEZER
+SUBSYS(freezer)
+#endif
+
+/* */
Index: linux-2.6.25-rc8-mm1/init/Kconfig
===================================================================
--- linux-2.6.25-rc8-mm1.orig/init/Kconfig
+++ linux-2.6.25-rc8-mm1/init/Kconfig
@@ -321,10 +321,17 @@ config GROUP_SCHED
default y
help
This feature lets CPU scheduler recognize task groups and control CPU
bandwidth allocation to such task groups.
+config CGROUP_FREEZER
+ bool "control group freezer subsystem"
+ depends on CGROUPS
+ help
+ Provides a way to freeze and unfreeze all tasks in a
+ cgroup
+
config FAIR_GROUP_SCHED
bool "Group scheduling for SCHED_OTHER"
depends on GROUP_SCHED
default y
Index: linux-2.6.25-rc8-mm1/kernel/Makefile
===================================================================
--- linux-2.6.25-rc8-mm1.orig/kernel/Makefile
+++ linux-2.6.25-rc8-mm1/kernel/Makefile
@@ -38,10 +38,11 @@ obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
obj-$(CONFIG_KEXEC) += kexec.o
obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o
obj-$(CONFIG_COMPAT) += compat.o
obj-$(CONFIG_CGROUPS) += cgroup.o
obj-$(CONFIG_CGROUP_DEBUG) += cgroup_debug.o
+obj-$(CONFIG_CGROUP_FREEZER) += cgroup_freezer.o
obj-$(CONFIG_CPUSETS) += cpuset.o
obj-$(CONFIG_CGROUP_NS) += ns_cgroup.o
obj-$(CONFIG_UTS_NS) += utsname.o
obj-$(CONFIG_USER_NS) += user_namespace.o
obj-$(CONFIG_PID_NS) += pid_namespace.o
Index: linux-2.6.25-rc8-mm1/kernel/cgroup_freezer.c
===================================================================
--- /dev/null
+++ linux-2.6.25-rc8-mm1/kernel/cgroup_freezer.c
@@ -0,0 +1,280 @@
+/*
+ * cgroup_freezer.c - control group freezer subsystem
+ *
+ * Copyright IBM Corp. 2007
+ *
+ * Author : Cedric Le Goater <clg@fr.ibm.com>
+ */
+
+#include <linux/module.h>
+#include <linux/cgroup.h>
+#include <linux/fs.h>
+#include <linux/uaccess.h>
+#include <linux/freezer.h>
+#include <linux/cgroup_freezer.h>
+
+static const char *freezer_state_strs[] = {
+ "RUNNING\n",
+ "FREEZING\n" ,
+ "FROZEN\n"
+};
+
+
+struct cgroup_subsys freezer_subsys;
+
+
+static struct cgroup_subsys_state *freezer_create(
+ struct cgroup_subsys *ss, struct cgroup *cgroup)
+{
+ struct freezer *freezer;
+
+ if (!capable(CAP_SYS_ADMIN))
+ return ERR_PTR(-EPERM);
+
+ freezer = kzalloc(sizeof(struct freezer), GFP_KERNEL);
+ if (!freezer)
+ return ERR_PTR(-ENOMEM);
+
+ spin_lock_init(&freezer->lock);
+ freezer->state = STATE_RUNNING;
+ return &freezer->css;
+}
+
+static void freezer_destroy(struct cgroup_subsys *ss,
+ struct cgroup *cgroup)
+{
+ kfree(cgroup_freezer(cgroup));
+}
+
+
+static int freezer_can_attach(struct cgroup_subsys *ss,
+ struct cgroup *new_cgroup,
+ struct task_struct *task)
+{
+ struct freezer *freezer = cgroup_freezer(new_cgroup);
+ int retval = 0;
+
+ if (freezer->state == STATE_FROZEN)
+ retval = -EBUSY;
+
+ return retval;
+}
+
+static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task)
+{
+ struct cgroup *cgroup = task_cgroup(task, freezer_subsys_id);
+ struct freezer *freezer = cgroup_freezer(cgroup);
+
+ spin_lock_irq(&freezer->lock);
+ if (freezer->state == STATE_FREEZING)
+ freeze_task(task, 1);
+ spin_unlock_irq(&freezer->lock);
+}
+
+static int freezer_check_if_frozen(struct cgroup *cgroup)
+{
+ struct cgroup_iter it;
+ struct task_struct *task;
+ unsigned int nfrozen = 0;
+
+ cgroup_iter_start(cgroup, &it);
+
+ while ((task = cgroup_iter_next(cgroup, &it))) {
+ if (frozen(task))
+ nfrozen++;
+ }
+ cgroup_iter_end(cgroup, &it);
+
+ return (nfrozen == cgroup_task_count(cgroup));
+}
+
+static ssize_t freezer_read(struct cgroup *cgroup,
+ struct cftype *cft,
+ struct file *file, char __user *buf,
+ size_t nbytes, loff_t *ppos)
+{
+ struct freezer *freezer = cgroup_freezer(cgroup);
+ enum freezer_state state;
+
+ spin_lock_irq(&freezer->lock);
+ if (freezer->state == STATE_FREEZING)
+ if (freezer_check_if_frozen(cgroup))
+ freezer->state = STATE_FROZEN;
+
+ state = freezer->state;
+ spin_unlock_irq(&freezer->lock);
+
+ return simple_read_from_buffer(buf, nbytes, ppos,
+ freezer_state_strs[state],
+ strlen(freezer_state_strs[state]) + 1);
+}
+
+static int freezer_kill(struct cgroup *cgroup, int signum)
+{
+ struct cgroup_iter it;
+ struct task_struct *task;
+ int retval = 0;
+
+ cgroup_iter_start(cgroup, &it);
+ while ((task = cgroup_iter_next(cgroup, &it))) {
+ retval = send_sig(signum, task, 1);
+ if (retval)
+ break;
+ }
+
+ cgroup_iter_end(cgroup, &it);
+ return retval;
+}
+
+static int freezer_freeze_tasks(struct cgroup *cgroup)
+{
+ struct cgroup_iter it;
+ struct task_struct *task;
+ unsigned int todo = 0;
+
+ cgroup_iter_start(cgroup, &it);
+ while ((task = cgroup_iter_next(cgroup, &it))) {
+ if (!freeze_task(task, 1))
+ continue;
+
+ if (!freezer_should_skip(task))
+ todo++;
+ }
+
+ cgroup_iter_end(cgroup, &it);
+ return todo ? -EBUSY : 0;
+}
+
+static int freezer_unfreeze_tasks(struct cgroup *cgroup)
+{
+ struct cgroup_iter it;
+ struct task_struct *task;
+
+ cgroup_iter_start(cgroup, &it);
+ while ((task = cgroup_iter_next(cgroup, &it)))
+ thaw_process(task);
+
+ cgroup_iter_end(cgroup, &it);
+ return 0;
+}
+
+static int freezer_freeze(struct cgroup *cgroup, int freeze)
+{
+ struct freezer *freezer = cgroup_freezer(cgroup);
+ int retval = 0;
+
+ spin_lock_irq(&freezer->lock);
+ switch (freezer->state) {
+ case STATE_RUNNING:
+ if (freeze) {
+ freezer->state = STATE_FREEZING;
+ retval = freezer_freeze_tasks(cgroup);
+ }
+ break;
+
+ case STATE_FREEZING:
+ case STATE_FROZEN:
+ if (!freeze) {
+ freezer->state = STATE_RUNNING;
+ retval = freezer_unfreeze_tasks(cgroup);
+ }
+ break;
+ }
+ spin_unlock_irq(&freezer->lock);
+
+ return retval;
+}
+
+enum cgroup_filetype {
+ FILE_FREEZE,
+ FILE_KILL,
+};
+
+static ssize_t freezer_write(struct cgroup *cgroup,
+ struct cftype *cft,
+ struct file *file,
+ const char __user *userbuf,
+ size_t nbytes, loff_t *unused_ppos)
+{
+ enum cgroup_filetype type = cft->private;
+ char *buffer;
+ int retval = 0;
+ int value;
+
+ if (nbytes >= PATH_MAX)
+ return -E2BIG;
+
+ /* +1 for nul-terminator */
+ buffer = kmalloc(nbytes + 1, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
+ if (copy_from_user(buffer, userbuf, nbytes)) {
+ retval = -EFAULT;
+ goto free_buffer;
+ }
+ buffer[nbytes] = 0; /* nul-terminate */
+
+ cgroup_lock();
+
+ if (cgroup_is_removed(cgroup)) {
+ retval = -ENODEV;
+ goto unlock;
+ }
+
+ if (sscanf(buffer, "%d", &value) != 1) {
+ retval = -EIO;
+ goto unlock;
+ }
+
+ switch (type) {
+ case FILE_FREEZE:
+ retval = freezer_freeze(cgroup, value);
+ break;
+
+ case FILE_KILL:
+ retval = freezer_kill(cgroup, value);
+ break;
+ default:
+ retval = -EINVAL;
+ }
+
+ if (retval == 0)
+ retval = nbytes;
+unlock:
+ cgroup_unlock();
+free_buffer:
+ kfree(buffer);
+ return retval;
+}
+
+static struct cftype files[] = {
+ {
+ .name = "freeze",
+ .read = freezer_read,
+ .write = freezer_write,
+ .private = FILE_FREEZE,
+ },
+ {
+ .name = "kill",
+ .write = freezer_write,
+ .private = FILE_KILL,
+ },
+};
+
+static int freezer_populate(struct cgroup_subsys *ss, struct cgroup *cgroup)
+{
+ return cgroup_add_files(cgroup, ss, files, ARRAY_SIZE(files));
+}
+
+struct cgroup_subsys freezer_subsys = {
+ .name = "freezer",
+ .create = freezer_create,
+ .destroy = freezer_destroy,
+ .populate = freezer_populate,
+ .subsys_id = freezer_subsys_id,
+ .can_attach = freezer_can_attach,
+ .attach = NULL,
+ .fork = freezer_fork,
+ .exit = NULL,
+};
Index: linux-2.6.25-rc8-mm1/kernel/freezer.c
===================================================================
--- linux-2.6.25-rc8-mm1.orig/kernel/freezer.c
+++ linux-2.6.25-rc8-mm1/kernel/freezer.c
@@ -120,5 +120,6 @@ int freeze_task(struct task_struct *p, i
}
}
task_unlock(p);
return ret;
}
+EXPORT_SYMBOL(freeze_task);
--
^ permalink raw reply [flat|nested] 37+ messages in thread* [PATCH 4/4] Container Freezer: Skip frozen cgroups during power management resume
[not found] <20080403001529.052250759@us.ibm.com>
` (2 preceding siblings ...)
2008-04-03 0:15 ` [PATCH 3/4] Container Freezer: Implement freezer cgroup subsystem Matt Helsley
@ 2008-04-03 0:15 ` Matt Helsley
2008-04-03 0:19 ` [PATCH 0/4] Container Freezer: Reuse Suspend Freezer Matt Helsley
2008-04-03 0:19 ` Matt Helsley
5 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-04-03 0:15 UTC (permalink / raw)
To: Linux-Kernel; +Cc: linux-pm, Cedric Le Goater
[-- Attachment #1: cgroup-freezer/cgroup-freezer-do-not-unfreeze-a-frozen-cgroup-when-system-is-resumed.patch --]
[-- Type: text/plain, Size: 1197 bytes --]
When a system is resumed after a suspend, it will also unfreeze
frozen cgroups.
This patchs modifies the resume sequence to skip the tasks which
are part of a frozen control group.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Cc: linux-pm@lists.linux-foundation.org
---
kernel/power/process.c | 4 ++++
1 file changed, 4 insertions(+)
Index: linux-2.6.25-rc5-mm1/kernel/power/process.c
===================================================================
--- linux-2.6.25-rc5-mm1.orig/kernel/power/process.c
+++ linux-2.6.25-rc5-mm1/kernel/power/process.c
@@ -11,10 +11,11 @@
#include <linux/interrupt.h>
#include <linux/suspend.h>
#include <linux/module.h>
#include <linux/syscalls.h>
#include <linux/freezer.h>
+#include <linux/cgroup_freezer.h>
/*
* Timeout for stopping processes
*/
#define TIMEOUT (20 * HZ)
@@ -150,10 +151,13 @@ static void thaw_tasks(int thaw_user_spa
continue;
if (!p->mm == thaw_user_space)
continue;
+ if (cgroup_frozen(p))
+ continue;
+
thaw_process(p);
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
}
--
^ permalink raw reply [flat|nested] 37+ messages in thread* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
[not found] <20080403001529.052250759@us.ibm.com>
` (3 preceding siblings ...)
2008-04-03 0:15 ` [PATCH 4/4] Container Freezer: Skip frozen cgroups during power management resume Matt Helsley
@ 2008-04-03 0:19 ` Matt Helsley
2008-04-03 0:19 ` Matt Helsley
5 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-04-03 0:19 UTC (permalink / raw)
To: Linux-Kernel; +Cc: linux-pm, Cedric Le Goater
On Wed, 2008-04-02 at 17:15 -0700, Matt Helsley wrote:
<snip>
> * Series
>
> Applies to 2.6.25-rc8-mm1
>
> The first patches make the freezer available to all architectures
> before implementing the freezer subsystem.
>
> [PATCH 1/4] Add TIF_FREEZE flag to all architectures
> [PATCH 2/4] Make refrigerator always available
> [PATCH 3/4] Implement freezer cgroup subsystem
> [PATCH 4/4] Skip frozen cgroups during power management resume
Argh. I forgot to add [RFC] tags to all of these!
> Each patch compiles, boots, and survives basic LTP containers and controllers
> tests.
>
> Comments are welcome.
>
> Cheers,
> -Matt Helsley
>
^ permalink raw reply [flat|nested] 37+ messages in thread* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
[not found] <20080403001529.052250759@us.ibm.com>
` (4 preceding siblings ...)
2008-04-03 0:19 ` [PATCH 0/4] Container Freezer: Reuse Suspend Freezer Matt Helsley
@ 2008-04-03 0:19 ` Matt Helsley
5 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-04-03 0:19 UTC (permalink / raw)
To: Linux-Kernel; +Cc: Cedric Le Goater, linux-pm
On Wed, 2008-04-02 at 17:15 -0700, Matt Helsley wrote:
<snip>
> * Series
>
> Applies to 2.6.25-rc8-mm1
>
> The first patches make the freezer available to all architectures
> before implementing the freezer subsystem.
>
> [PATCH 1/4] Add TIF_FREEZE flag to all architectures
> [PATCH 2/4] Make refrigerator always available
> [PATCH 3/4] Implement freezer cgroup subsystem
> [PATCH 4/4] Skip frozen cgroups during power management resume
Argh. I forgot to add [RFC] tags to all of these!
> Each patch compiles, boots, and survives basic LTP containers and controllers
> tests.
>
> Comments are welcome.
>
> Cheers,
> -Matt Helsley
>
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
@ 2008-07-07 22:58 Matt Helsley
[not found] ` <20080707225823.502032693-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
` (3 more replies)
0 siblings, 4 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-07 22:58 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Paul Menage, Pavel Machek, Linux-Kernel, linux-pm,
Linux Containers
This patchset reuses the container infrastructure and the swsusp freezer to
freeze a group of tasks.
The freezer subsystem in the container filesystem defines a file named
freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup.
Reading will return the current state.
* Examples of usage :
# mkdir /containers/freezer
# mount -t cgroup -ofreezer,signal 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
to kill all tasks in the container :
# echo 9 > /containers/0/signal.kill
I've reworked Cedric's patches to use task_lock() to protect access to the
task's cgroup.
Paul, Pavel asked me to send these to Rafael next. They are patches to make
the freezer useful for checkpoint/restart using cgroups so it would be nice
to get an explicit [N]Ack from you first.
Rafael, if Paul agrees, please consider applying these patches.
Changes since v3:
v4 (Almost all of these changes are confined to patch 3):
Reworked the series to use task_lock() instead of RCU.
Reworked the series to use write_string() and read_seq_string()
cgroup methods.
Fixed the race Paul Menage identified.
Fixed up check_if_frozen() to do more than just test the FROZEN
flag. In some cases tasks could be stopped (T) and marked
FREEZING. When that happens we can safely assume that it
will be frozen immediately upon waking up in the kernel.
Waiting for it to get marked with PF_FROZEN in order to
transition to the FROZEN state would block unnecessarily.
Removed freezer_ prefix from static functions in cgroup_freezer.c.
Simplified STATE_ switch.
Updated the locking comments.
v3:
Ported to 2.6.26-rc5-mm2 with Rafael's freezer patches
Tested on 24 combinations of 3 architectures (x86, x86_64, ppc64)
with 8 different kernel configs varying power management
and cgroup config variables. Each patch builds and boots
in these 24 combinations.
Passes functional testing.
v2 (roughly patches 3 and 5):
Moved the "kill" file into a separate cgroup subsystem (signal) and
it's own patch.
Changed the name of the file from freezer.freeze to freezer.state.
Switched from taking 1 and 0 as input to the strings "FROZEN" and
"RUNNING", respectively. This helps keep the interface
human-usable if/when we need to more states.
Checked that stopped or interrupted is "frozen enough"
Since try_to_freeze() is called upon wakeup of these tasks
this should be fine. This idea comes from recent changes to
the freezer.
Checked that if (task == current) whilst freezing cgroup we're ok
Fixed bug where -EBUSY would always be returned when freezing
Added code to handle userspace retries for any remaining -EBUSY
Cheers,
-Matt Helsley
--
^ permalink raw reply [flat|nested] 37+ messages in thread[parent not found: <20080707225823.502032693-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
[not found] ` <20080707225823.502032693-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2008-07-07 23:02 ` Matt Helsley
2008-07-08 3:31 ` KAMEZAWA Hiroyuki
1 sibling, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-07 23:02 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux Containers, Paul Menage, Linux-Kernel, Pavel Machek,
linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
On Mon, 2008-07-07 at 15:58 -0700, Matt Helsley wrote:
> This patchset reuses the container infrastructure and the swsusp freezer to
> freeze a group of tasks.
>
> The freezer subsystem in the container filesystem defines a file named
> freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
> cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup.
> Reading will return the current state.
>
> * Examples of usage :
>
> # mkdir /containers/freezer
> # mount -t cgroup -ofreezer,signal 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
>
> to kill all tasks in the container :
>
> # echo 9 > /containers/0/signal.kill
>
> I've reworked Cedric's patches to use task_lock() to protect access to the
> task's cgroup.
>
> Paul, Pavel asked me to send these to Rafael next. They are patches to make
> the freezer useful for checkpoint/restart using cgroups so it would be nice
> to get an explicit [N]Ack from you first.
>
> Rafael, if Paul agrees, please consider applying these patches.
>
> Changes since v3:
> v4 (Almost all of these changes are confined to patch 3):
> Reworked the series to use task_lock() instead of RCU.
> Reworked the series to use write_string() and read_seq_string()
> cgroup methods.
FYI - This means these patches need Paul's patches introducing
write_string(). I can certainly restore the old code for .read
and .write, but I was anticipating write_string() making it into various
trees first. If that's not necessarily the case please let me know.
Cheers,
-Matt
^ permalink raw reply [flat|nested] 37+ messages in thread* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-07 22:58 Matt Helsley
@ 2008-07-08 3:31 ` KAMEZAWA Hiroyuki
2008-07-07 23:02 ` Matt Helsley
` (2 subsequent siblings)
3 siblings, 0 replies; 37+ messages in thread
From: KAMEZAWA Hiroyuki @ 2008-07-08 3:31 UTC (permalink / raw)
To: Matt Helsley
Cc: Linux Containers, Linux-Kernel, Rafael J. Wysocki, Pavel Machek,
linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Paul Menage
Hi, could I make brief questions ?
On Mon, 07 Jul 2008 15:58:23 -0700
Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
> 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
>
I'm just curious.
1. When we see FREEZING and have to retry ?
While there are some threads which wait for some event ?
2. What happens when FROZEN threads are moved to other group ?
Can we move them ?
Can we wake them up (if it can be moved) ?
What operations are allowed to frozen threads ?
Thanks,
-Kame
^ permalink raw reply [flat|nested] 37+ messages in thread* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
@ 2008-07-08 3:31 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 37+ messages in thread
From: KAMEZAWA Hiroyuki @ 2008-07-08 3:31 UTC (permalink / raw)
To: Matt Helsley
Cc: Rafael J. Wysocki, Linux Containers, Paul Menage, Linux-Kernel,
Pavel Machek, linux-pm
Hi, could I make brief questions ?
On Mon, 07 Jul 2008 15:58:23 -0700
Matt Helsley <matthltc@us.ibm.com> wrote:
> 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
>
I'm just curious.
1. When we see FREEZING and have to retry ?
While there are some threads which wait for some event ?
2. What happens when FROZEN threads are moved to other group ?
Can we move them ?
Can we wake them up (if it can be moved) ?
What operations are allowed to frozen threads ?
Thanks,
-Kame
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-08 3:31 ` KAMEZAWA Hiroyuki
(?)
@ 2008-07-08 19:39 ` Matt Helsley
[not found] ` <1215545954.9023.120.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-07-08 20:06 ` Paul Menage
-1 siblings, 2 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-08 19:39 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: Rafael J. Wysocki, Cedric Le Goater, Linux Containers,
Paul Menage, Linux-Kernel, Pavel Machek, linux-pm
Cedric was accidentally not Cc'd on the introduction (PATCH 0). Adding
him.
On Tue, 2008-07-08 at 12:31 +0900, KAMEZAWA Hiroyuki wrote:
> Hi, could I make brief questions ?
>
> On Mon, 07 Jul 2008 15:58:23 -0700
> Matt Helsley <matthltc@us.ibm.com> wrote:
> > 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
> >
> I'm just curious.
>
> 1. When we see FREEZING and have to retry ?
One example is when some processes are in the a specific portion of
vfork() you might see FREEZING and have to retry.
> While there are some threads which wait for some event ?
Depending on which kind of "wait" they are performing, yes. If it's
uninterruptible sleep and the PF_FROZEN flag is not set then you might
see FREEZING.
> 2. What happens when FROZEN threads are moved to other group ?
> Can we move them ?
If the destination cgroup is not FROZEN, yes.
If the destination cgroup is FREEZING this works as expected.
If the destination cgroup is RUNNING you'd have a problem unfreezing the
task. This happends because the cgroup has a state inconsistent with the
task's state. To unfreeze the task you'd have to try to freeze and then
unfreeze the destination cgroup.
There are several ways I could change this.
One is to try and disallow users from moving frozen tasks. That doesn't
seem like a good approach since it would require a new cgroups interface
"can_detach()".
However we can prevent attach so I could add checks that look at the
attaching tasks's state and refuse the attach when the task's state
(unfrozen, frozen) is inconsistent with the cgroup state (RUNNING,
FREEZING, FROZEN). I'll send a fifth patch on top of this series showing
this idea.
Rather than refuse to allow attach we could change the destination
cgroup's state during attach so that the two states are consistent.
However, this introduces more ugly cases for userspace to be aware of.
> Can we wake them up (if it can be moved) ?
You can't wake them until you've unfrozen them.
> What operations are allowed to frozen threads ?
Any operation that doesn't require the threads to run.
Cheers,
-Matt Helsley
^ permalink raw reply [flat|nested] 37+ messages in thread[parent not found: <1215545954.9023.120.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>]
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
[not found] ` <1215545954.9023.120.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2008-07-08 20:06 ` Paul Menage
0 siblings, 0 replies; 37+ messages in thread
From: Paul Menage @ 2008-07-08 20:06 UTC (permalink / raw)
To: Matt Helsley
Cc: Linux Containers, Linux-Kernel, Rafael J. Wysocki,
Cedric Le Goater, Pavel Machek,
linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
>
> One is to try and disallow users from moving frozen tasks. That doesn't
> seem like a good approach since it would require a new cgroups interface
> "can_detach()".
Detaching from the old cgroup happens at the same time as attaching to
the new cgroup, so can_attach() would work here.
Paul
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-08 19:39 ` Matt Helsley
@ 2008-07-08 20:06 ` Paul Menage
2008-07-08 20:06 ` Paul Menage
1 sibling, 0 replies; 37+ messages in thread
From: Paul Menage @ 2008-07-08 20:06 UTC (permalink / raw)
To: Matt Helsley
Cc: Linux Containers, Linux-Kernel, Cedric Le Goater, linux-pm,
KAMEZAWA Hiroyuki
On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc@us.ibm.com> wrote:
>
> One is to try and disallow users from moving frozen tasks. That doesn't
> seem like a good approach since it would require a new cgroups interface
> "can_detach()".
Detaching from the old cgroup happens at the same time as attaching to
the new cgroup, so can_attach() would work here.
Paul
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
@ 2008-07-08 20:06 ` Paul Menage
0 siblings, 0 replies; 37+ messages in thread
From: Paul Menage @ 2008-07-08 20:06 UTC (permalink / raw)
To: Matt Helsley
Cc: KAMEZAWA Hiroyuki, Rafael J. Wysocki, Cedric Le Goater,
Linux Containers, Linux-Kernel, Pavel Machek, linux-pm
On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc@us.ibm.com> wrote:
>
> One is to try and disallow users from moving frozen tasks. That doesn't
> seem like a good approach since it would require a new cgroups interface
> "can_detach()".
Detaching from the old cgroup happens at the same time as attaching to
the new cgroup, so can_attach() would work here.
Paul
^ permalink raw reply [flat|nested] 37+ messages in thread
[parent not found: <6599ad830807081306l61622eadk215a25d02ee94b00-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
[not found] ` <6599ad830807081306l61622eadk215a25d02ee94b00-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-07-08 20:07 ` Paul Menage
0 siblings, 0 replies; 37+ messages in thread
From: Paul Menage @ 2008-07-08 20:07 UTC (permalink / raw)
To: Matt Helsley
Cc: Linux Containers, Linux-Kernel, Rafael J. Wysocki,
Cedric Le Goater, Pavel Machek,
linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
>>
>> One is to try and disallow users from moving frozen tasks. That doesn't
>> seem like a good approach since it would require a new cgroups interface
>> "can_detach()".
>
> Detaching from the old cgroup happens at the same time as attaching to
> the new cgroup, so can_attach() would work here.
And the whole can_attach()/attach() protocol needs reworking anyway,
see my email (hopefully) later today.
Paul
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-08 20:06 ` Paul Menage
(?)
(?)
@ 2008-07-08 20:07 ` Paul Menage
2008-07-09 21:58 ` Matt Helsley
` (2 more replies)
-1 siblings, 3 replies; 37+ messages in thread
From: Paul Menage @ 2008-07-08 20:07 UTC (permalink / raw)
To: Matt Helsley
Cc: KAMEZAWA Hiroyuki, Rafael J. Wysocki, Cedric Le Goater,
Linux Containers, Linux-Kernel, Pavel Machek, linux-pm
On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage@google.com> wrote:
> On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc@us.ibm.com> wrote:
>>
>> One is to try and disallow users from moving frozen tasks. That doesn't
>> seem like a good approach since it would require a new cgroups interface
>> "can_detach()".
>
> Detaching from the old cgroup happens at the same time as attaching to
> the new cgroup, so can_attach() would work here.
And the whole can_attach()/attach() protocol needs reworking anyway,
see my email (hopefully) later today.
Paul
^ permalink raw reply [flat|nested] 37+ messages in thread* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-08 20:07 ` Paul Menage
@ 2008-07-09 21:58 ` Matt Helsley
[not found] ` <1215640723.7149.35.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-07-10 0:42 ` KAMEZAWA Hiroyuki
2008-07-09 21:58 ` Matt Helsley
[not found] ` <6599ad830807081307j811689aldf0f6cb38579c450-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2 siblings, 2 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-09 21:58 UTC (permalink / raw)
To: Paul Menage
Cc: KAMEZAWA Hiroyuki, Rafael J. Wysocki, Cedric Le Goater,
Linux Containers, Linux-Kernel, Pavel Machek, linux-pm
On Tue, 2008-07-08 at 13:07 -0700, Paul Menage wrote:
> On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage@google.com> wrote:
> > On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc@us.ibm.com> wrote:
> >>
> >> One is to try and disallow users from moving frozen tasks. That doesn't
> >> seem like a good approach since it would require a new cgroups interface
> >> "can_detach()".
> >
> > Detaching from the old cgroup happens at the same time as attaching to
> > the new cgroup, so can_attach() would work here.
Update: I've made a patch implementing this. However it might be better
to just modify attach() to thaw the moving task rather than disallow
moving the frozen task. Serge, Cedric, Kame-san, do you have any
thoughts on which is more useful and/or intuitive?
> And the whole can_attach()/attach() protocol needs reworking anyway,
> see my email (hopefully) later today.
>
> Paul
Interesting. I look forward to seeing this.
Cheers,
-Matt
^ permalink raw reply [flat|nested] 37+ messages in thread[parent not found: <1215640723.7149.35.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>]
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
[not found] ` <1215640723.7149.35.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2008-07-10 0:42 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 37+ messages in thread
From: KAMEZAWA Hiroyuki @ 2008-07-10 0:42 UTC (permalink / raw)
To: Matt Helsley
Cc: Linux Containers, Linux-Kernel, Rafael J. Wysocki,
Cedric Le Goater, Pavel Machek, Paul Menage,
linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
On Wed, 09 Jul 2008 14:58:43 -0700
Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
>
> On Tue, 2008-07-08 at 13:07 -0700, Paul Menage wrote:
> > On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> > > On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
> > >>
> > >> One is to try and disallow users from moving frozen tasks. That doesn't
> > >> seem like a good approach since it would require a new cgroups interface
> > >> "can_detach()".
> > >
> > > Detaching from the old cgroup happens at the same time as attaching to
> > > the new cgroup, so can_attach() would work here.
>
> Update: I've made a patch implementing this. However it might be better
> to just modify attach() to thaw the moving task rather than disallow
> moving the frozen task. Serge, Cedric, Kame-san, do you have any
> thoughts on which is more useful and/or intuitive?
>
Thank you for explanation in previous mail.
Hmm, just thawing seems atractive but it will confuse people (I think).
I think some kind of process-group is freezed by this freezer and "moving
freezed task" is wrong(unexpected) operation in general. And there will
be no demand to do that from users.
I think just taking "moving freezed task" as error-operation and returning
-EBUSY is better.
Thanks,
-Kame
> > And the whole can_attach()/attach() protocol needs reworking anyway,
> > see my email (hopefully) later today.
> >
> > Paul
>
> Interesting. I look forward to seeing this.
>
> Cheers,
> -Matt
>
>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-09 21:58 ` Matt Helsley
@ 2008-07-10 0:42 ` KAMEZAWA Hiroyuki
2008-07-10 0:42 ` KAMEZAWA Hiroyuki
1 sibling, 0 replies; 37+ messages in thread
From: KAMEZAWA Hiroyuki @ 2008-07-10 0:42 UTC (permalink / raw)
To: Matt Helsley
Cc: Linux Containers, Linux-Kernel, Cedric Le Goater, Paul Menage,
linux-pm
On Wed, 09 Jul 2008 14:58:43 -0700
Matt Helsley <matthltc@us.ibm.com> wrote:
>
> On Tue, 2008-07-08 at 13:07 -0700, Paul Menage wrote:
> > On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage@google.com> wrote:
> > > On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc@us.ibm.com> wrote:
> > >>
> > >> One is to try and disallow users from moving frozen tasks. That doesn't
> > >> seem like a good approach since it would require a new cgroups interface
> > >> "can_detach()".
> > >
> > > Detaching from the old cgroup happens at the same time as attaching to
> > > the new cgroup, so can_attach() would work here.
>
> Update: I've made a patch implementing this. However it might be better
> to just modify attach() to thaw the moving task rather than disallow
> moving the frozen task. Serge, Cedric, Kame-san, do you have any
> thoughts on which is more useful and/or intuitive?
>
Thank you for explanation in previous mail.
Hmm, just thawing seems atractive but it will confuse people (I think).
I think some kind of process-group is freezed by this freezer and "moving
freezed task" is wrong(unexpected) operation in general. And there will
be no demand to do that from users.
I think just taking "moving freezed task" as error-operation and returning
-EBUSY is better.
Thanks,
-Kame
> > And the whole can_attach()/attach() protocol needs reworking anyway,
> > see my email (hopefully) later today.
> >
> > Paul
>
> Interesting. I look forward to seeing this.
>
> Cheers,
> -Matt
>
>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
@ 2008-07-10 0:42 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 37+ messages in thread
From: KAMEZAWA Hiroyuki @ 2008-07-10 0:42 UTC (permalink / raw)
To: Matt Helsley
Cc: Paul Menage, Rafael J. Wysocki, Cedric Le Goater,
Linux Containers, Linux-Kernel, Pavel Machek, linux-pm
On Wed, 09 Jul 2008 14:58:43 -0700
Matt Helsley <matthltc@us.ibm.com> wrote:
>
> On Tue, 2008-07-08 at 13:07 -0700, Paul Menage wrote:
> > On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage@google.com> wrote:
> > > On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc@us.ibm.com> wrote:
> > >>
> > >> One is to try and disallow users from moving frozen tasks. That doesn't
> > >> seem like a good approach since it would require a new cgroups interface
> > >> "can_detach()".
> > >
> > > Detaching from the old cgroup happens at the same time as attaching to
> > > the new cgroup, so can_attach() would work here.
>
> Update: I've made a patch implementing this. However it might be better
> to just modify attach() to thaw the moving task rather than disallow
> moving the frozen task. Serge, Cedric, Kame-san, do you have any
> thoughts on which is more useful and/or intuitive?
>
Thank you for explanation in previous mail.
Hmm, just thawing seems atractive but it will confuse people (I think).
I think some kind of process-group is freezed by this freezer and "moving
freezed task" is wrong(unexpected) operation in general. And there will
be no demand to do that from users.
I think just taking "moving freezed task" as error-operation and returning
-EBUSY is better.
Thanks,
-Kame
> > And the whole can_attach()/attach() protocol needs reworking anyway,
> > see my email (hopefully) later today.
> >
> > Paul
>
> Interesting. I look forward to seeing this.
>
> Cheers,
> -Matt
>
>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-10 0:42 ` KAMEZAWA Hiroyuki
(?)
@ 2008-07-10 14:40 ` Serge E. Hallyn
-1 siblings, 0 replies; 37+ messages in thread
From: Serge E. Hallyn @ 2008-07-10 14:40 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: Matt Helsley, Linux Containers, Linux-Kernel, Rafael J. Wysocki,
Cedric Le Goater, Pavel Machek, Paul Menage, linux-pm
Quoting KAMEZAWA Hiroyuki (kamezawa.hiroyu@jp.fujitsu.com):
> On Wed, 09 Jul 2008 14:58:43 -0700
> Matt Helsley <matthltc@us.ibm.com> wrote:
>
> >
> > On Tue, 2008-07-08 at 13:07 -0700, Paul Menage wrote:
> > > On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage@google.com> wrote:
> > > > On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc@us.ibm.com> wrote:
> > > >>
> > > >> One is to try and disallow users from moving frozen tasks. That doesn't
> > > >> seem like a good approach since it would require a new cgroups interface
> > > >> "can_detach()".
> > > >
> > > > Detaching from the old cgroup happens at the same time as attaching to
> > > > the new cgroup, so can_attach() would work here.
> >
> > Update: I've made a patch implementing this. However it might be better
> > to just modify attach() to thaw the moving task rather than disallow
> > moving the frozen task. Serge, Cedric, Kame-san, do you have any
> > thoughts on which is more useful and/or intuitive?
> >
>
> Thank you for explanation in previous mail.
>
> Hmm, just thawing seems atractive but it will confuse people (I think).
>
> I think some kind of process-group is freezed by this freezer and "moving
> freezed task" is wrong(unexpected) operation in general. And there will
> be no demand to do that from users.
> I think just taking "moving freezed task" as error-operation and returning
> -EBUSY is better.
>
> Thanks,
> -Kame
I'm torn. Allowing the moves is kind of cool, but I think I agree that
we should start out with the simpler semantics, which in this case is
disallowing the move. The race Li may have found will only become more
complicated when both sides of the race can change the task's frozen
state.
-serge
^ permalink raw reply [flat|nested] 37+ messages in thread
[parent not found: <20080710094231.58d9e1b9.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
[not found] ` <20080710094231.58d9e1b9.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
@ 2008-07-10 14:40 ` Serge E. Hallyn
0 siblings, 0 replies; 37+ messages in thread
From: Serge E. Hallyn @ 2008-07-10 14:40 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: Linux Containers, Linux-Kernel, Rafael J. Wysocki,
Cedric Le Goater, Pavel Machek, Paul Menage,
linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
Quoting KAMEZAWA Hiroyuki (kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org):
> On Wed, 09 Jul 2008 14:58:43 -0700
> Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
>
> >
> > On Tue, 2008-07-08 at 13:07 -0700, Paul Menage wrote:
> > > On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> > > > On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
> > > >>
> > > >> One is to try and disallow users from moving frozen tasks. That doesn't
> > > >> seem like a good approach since it would require a new cgroups interface
> > > >> "can_detach()".
> > > >
> > > > Detaching from the old cgroup happens at the same time as attaching to
> > > > the new cgroup, so can_attach() would work here.
> >
> > Update: I've made a patch implementing this. However it might be better
> > to just modify attach() to thaw the moving task rather than disallow
> > moving the frozen task. Serge, Cedric, Kame-san, do you have any
> > thoughts on which is more useful and/or intuitive?
> >
>
> Thank you for explanation in previous mail.
>
> Hmm, just thawing seems atractive but it will confuse people (I think).
>
> I think some kind of process-group is freezed by this freezer and "moving
> freezed task" is wrong(unexpected) operation in general. And there will
> be no demand to do that from users.
> I think just taking "moving freezed task" as error-operation and returning
> -EBUSY is better.
>
> Thanks,
> -Kame
I'm torn. Allowing the moves is kind of cool, but I think I agree that
we should start out with the simpler semantics, which in this case is
disallowing the move. The race Li may have found will only become more
complicated when both sides of the race can change the task's frozen
state.
-serge
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-10 0:42 ` KAMEZAWA Hiroyuki
` (2 preceding siblings ...)
(?)
@ 2008-07-10 14:40 ` Serge E. Hallyn
-1 siblings, 0 replies; 37+ messages in thread
From: Serge E. Hallyn @ 2008-07-10 14:40 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: Linux Containers, Linux-Kernel, Cedric Le Goater, Paul Menage,
linux-pm
Quoting KAMEZAWA Hiroyuki (kamezawa.hiroyu@jp.fujitsu.com):
> On Wed, 09 Jul 2008 14:58:43 -0700
> Matt Helsley <matthltc@us.ibm.com> wrote:
>
> >
> > On Tue, 2008-07-08 at 13:07 -0700, Paul Menage wrote:
> > > On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage@google.com> wrote:
> > > > On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc@us.ibm.com> wrote:
> > > >>
> > > >> One is to try and disallow users from moving frozen tasks. That doesn't
> > > >> seem like a good approach since it would require a new cgroups interface
> > > >> "can_detach()".
> > > >
> > > > Detaching from the old cgroup happens at the same time as attaching to
> > > > the new cgroup, so can_attach() would work here.
> >
> > Update: I've made a patch implementing this. However it might be better
> > to just modify attach() to thaw the moving task rather than disallow
> > moving the frozen task. Serge, Cedric, Kame-san, do you have any
> > thoughts on which is more useful and/or intuitive?
> >
>
> Thank you for explanation in previous mail.
>
> Hmm, just thawing seems atractive but it will confuse people (I think).
>
> I think some kind of process-group is freezed by this freezer and "moving
> freezed task" is wrong(unexpected) operation in general. And there will
> be no demand to do that from users.
> I think just taking "moving freezed task" as error-operation and returning
> -EBUSY is better.
>
> Thanks,
> -Kame
I'm torn. Allowing the moves is kind of cool, but I think I agree that
we should start out with the simpler semantics, which in this case is
disallowing the move. The race Li may have found will only become more
complicated when both sides of the race can change the task's frozen
state.
-serge
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-08 20:07 ` Paul Menage
2008-07-09 21:58 ` Matt Helsley
@ 2008-07-09 21:58 ` Matt Helsley
[not found] ` <6599ad830807081307j811689aldf0f6cb38579c450-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-09 21:58 UTC (permalink / raw)
To: Paul Menage
Cc: Linux Containers, Linux-Kernel, Cedric Le Goater, linux-pm,
KAMEZAWA Hiroyuki
On Tue, 2008-07-08 at 13:07 -0700, Paul Menage wrote:
> On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage@google.com> wrote:
> > On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc@us.ibm.com> wrote:
> >>
> >> One is to try and disallow users from moving frozen tasks. That doesn't
> >> seem like a good approach since it would require a new cgroups interface
> >> "can_detach()".
> >
> > Detaching from the old cgroup happens at the same time as attaching to
> > the new cgroup, so can_attach() would work here.
Update: I've made a patch implementing this. However it might be better
to just modify attach() to thaw the moving task rather than disallow
moving the frozen task. Serge, Cedric, Kame-san, do you have any
thoughts on which is more useful and/or intuitive?
> And the whole can_attach()/attach() protocol needs reworking anyway,
> see my email (hopefully) later today.
>
> Paul
Interesting. I look forward to seeing this.
Cheers,
-Matt
^ permalink raw reply [flat|nested] 37+ messages in thread[parent not found: <6599ad830807081307j811689aldf0f6cb38579c450-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
[not found] ` <6599ad830807081307j811689aldf0f6cb38579c450-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-07-09 21:58 ` Matt Helsley
0 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-09 21:58 UTC (permalink / raw)
To: Paul Menage
Cc: Linux Containers, Linux-Kernel, Rafael J. Wysocki,
Cedric Le Goater, Pavel Machek,
linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
On Tue, 2008-07-08 at 13:07 -0700, Paul Menage wrote:
> On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> > On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
> >>
> >> One is to try and disallow users from moving frozen tasks. That doesn't
> >> seem like a good approach since it would require a new cgroups interface
> >> "can_detach()".
> >
> > Detaching from the old cgroup happens at the same time as attaching to
> > the new cgroup, so can_attach() would work here.
Update: I've made a patch implementing this. However it might be better
to just modify attach() to thaw the moving task rather than disallow
moving the frozen task. Serge, Cedric, Kame-san, do you have any
thoughts on which is more useful and/or intuitive?
> And the whole can_attach()/attach() protocol needs reworking anyway,
> see my email (hopefully) later today.
>
> Paul
Interesting. I look forward to seeing this.
Cheers,
-Matt
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-08 20:06 ` Paul Menage
` (2 preceding siblings ...)
(?)
@ 2008-07-08 20:07 ` Paul Menage
-1 siblings, 0 replies; 37+ messages in thread
From: Paul Menage @ 2008-07-08 20:07 UTC (permalink / raw)
To: Matt Helsley
Cc: Linux Containers, Linux-Kernel, Cedric Le Goater, linux-pm,
KAMEZAWA Hiroyuki
On Tue, Jul 8, 2008 at 1:06 PM, Paul Menage <menage@google.com> wrote:
> On Tue, Jul 8, 2008 at 12:39 PM, Matt Helsley <matthltc@us.ibm.com> wrote:
>>
>> One is to try and disallow users from moving frozen tasks. That doesn't
>> seem like a good approach since it would require a new cgroups interface
>> "can_detach()".
>
> Detaching from the old cgroup happens at the same time as attaching to
> the new cgroup, so can_attach() would work here.
And the whole can_attach()/attach() protocol needs reworking anyway,
see my email (hopefully) later today.
Paul
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-08 3:31 ` KAMEZAWA Hiroyuki
(?)
(?)
@ 2008-07-08 19:39 ` Matt Helsley
-1 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-08 19:39 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: Linux Containers, Linux-Kernel, Cedric Le Goater, Paul Menage,
linux-pm
Cedric was accidentally not Cc'd on the introduction (PATCH 0). Adding
him.
On Tue, 2008-07-08 at 12:31 +0900, KAMEZAWA Hiroyuki wrote:
> Hi, could I make brief questions ?
>
> On Mon, 07 Jul 2008 15:58:23 -0700
> Matt Helsley <matthltc@us.ibm.com> wrote:
> > 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
> >
> I'm just curious.
>
> 1. When we see FREEZING and have to retry ?
One example is when some processes are in the a specific portion of
vfork() you might see FREEZING and have to retry.
> While there are some threads which wait for some event ?
Depending on which kind of "wait" they are performing, yes. If it's
uninterruptible sleep and the PF_FROZEN flag is not set then you might
see FREEZING.
> 2. What happens when FROZEN threads are moved to other group ?
> Can we move them ?
If the destination cgroup is not FROZEN, yes.
If the destination cgroup is FREEZING this works as expected.
If the destination cgroup is RUNNING you'd have a problem unfreezing the
task. This happends because the cgroup has a state inconsistent with the
task's state. To unfreeze the task you'd have to try to freeze and then
unfreeze the destination cgroup.
There are several ways I could change this.
One is to try and disallow users from moving frozen tasks. That doesn't
seem like a good approach since it would require a new cgroups interface
"can_detach()".
However we can prevent attach so I could add checks that look at the
attaching tasks's state and refuse the attach when the task's state
(unfrozen, frozen) is inconsistent with the cgroup state (RUNNING,
FREEZING, FROZEN). I'll send a fifth patch on top of this series showing
this idea.
Rather than refuse to allow attach we could change the destination
cgroup's state during attach so that the two states are consistent.
However, this introduces more ugly cases for userspace to be aware of.
> Can we wake them up (if it can be moved) ?
You can't wake them until you've unfrozen them.
> What operations are allowed to frozen threads ?
Any operation that doesn't require the threads to run.
Cheers,
-Matt Helsley
^ permalink raw reply [flat|nested] 37+ messages in thread
[parent not found: <20080708123150.3034d83f.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
[not found] ` <20080708123150.3034d83f.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
@ 2008-07-08 19:39 ` Matt Helsley
0 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-08 19:39 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: Linux Containers, Linux-Kernel, Rafael J. Wysocki,
Cedric Le Goater, Pavel Machek, Paul Menage,
linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
Cedric was accidentally not Cc'd on the introduction (PATCH 0). Adding
him.
On Tue, 2008-07-08 at 12:31 +0900, KAMEZAWA Hiroyuki wrote:
> Hi, could I make brief questions ?
>
> On Mon, 07 Jul 2008 15:58:23 -0700
> Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
> > 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
> >
> I'm just curious.
>
> 1. When we see FREEZING and have to retry ?
One example is when some processes are in the a specific portion of
vfork() you might see FREEZING and have to retry.
> While there are some threads which wait for some event ?
Depending on which kind of "wait" they are performing, yes. If it's
uninterruptible sleep and the PF_FROZEN flag is not set then you might
see FREEZING.
> 2. What happens when FROZEN threads are moved to other group ?
> Can we move them ?
If the destination cgroup is not FROZEN, yes.
If the destination cgroup is FREEZING this works as expected.
If the destination cgroup is RUNNING you'd have a problem unfreezing the
task. This happends because the cgroup has a state inconsistent with the
task's state. To unfreeze the task you'd have to try to freeze and then
unfreeze the destination cgroup.
There are several ways I could change this.
One is to try and disallow users from moving frozen tasks. That doesn't
seem like a good approach since it would require a new cgroups interface
"can_detach()".
However we can prevent attach so I could add checks that look at the
attaching tasks's state and refuse the attach when the task's state
(unfrozen, frozen) is inconsistent with the cgroup state (RUNNING,
FREEZING, FROZEN). I'll send a fifth patch on top of this series showing
this idea.
Rather than refuse to allow attach we could change the destination
cgroup's state during attach so that the two states are consistent.
However, this introduces more ugly cases for userspace to be aware of.
> Can we wake them up (if it can be moved) ?
You can't wake them until you've unfrozen them.
> What operations are allowed to frozen threads ?
Any operation that doesn't require the threads to run.
Cheers,
-Matt Helsley
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-07 22:58 Matt Helsley
[not found] ` <20080707225823.502032693-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2008-07-07 23:02 ` Matt Helsley
2008-07-07 23:02 ` Matt Helsley
2008-07-08 3:31 ` KAMEZAWA Hiroyuki
3 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-07 23:02 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Linux Containers, Paul Menage, Linux-Kernel, linux-pm
On Mon, 2008-07-07 at 15:58 -0700, Matt Helsley wrote:
> This patchset reuses the container infrastructure and the swsusp freezer to
> freeze a group of tasks.
>
> The freezer subsystem in the container filesystem defines a file named
> freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
> cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup.
> Reading will return the current state.
>
> * Examples of usage :
>
> # mkdir /containers/freezer
> # mount -t cgroup -ofreezer,signal 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
>
> to kill all tasks in the container :
>
> # echo 9 > /containers/0/signal.kill
>
> I've reworked Cedric's patches to use task_lock() to protect access to the
> task's cgroup.
>
> Paul, Pavel asked me to send these to Rafael next. They are patches to make
> the freezer useful for checkpoint/restart using cgroups so it would be nice
> to get an explicit [N]Ack from you first.
>
> Rafael, if Paul agrees, please consider applying these patches.
>
> Changes since v3:
> v4 (Almost all of these changes are confined to patch 3):
> Reworked the series to use task_lock() instead of RCU.
> Reworked the series to use write_string() and read_seq_string()
> cgroup methods.
FYI - This means these patches need Paul's patches introducing
write_string(). I can certainly restore the old code for .read
and .write, but I was anticipating write_string() making it into various
trees first. If that's not necessarily the case please let me know.
Cheers,
-Matt
^ permalink raw reply [flat|nested] 37+ messages in thread* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-07 22:58 Matt Helsley
[not found] ` <20080707225823.502032693-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-07-07 23:02 ` Matt Helsley
@ 2008-07-07 23:02 ` Matt Helsley
2008-07-08 3:31 ` KAMEZAWA Hiroyuki
3 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-07 23:02 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Paul Menage, Pavel Machek, Linux-Kernel, linux-pm,
Linux Containers
On Mon, 2008-07-07 at 15:58 -0700, Matt Helsley wrote:
> This patchset reuses the container infrastructure and the swsusp freezer to
> freeze a group of tasks.
>
> The freezer subsystem in the container filesystem defines a file named
> freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
> cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup.
> Reading will return the current state.
>
> * Examples of usage :
>
> # mkdir /containers/freezer
> # mount -t cgroup -ofreezer,signal 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
>
> to kill all tasks in the container :
>
> # echo 9 > /containers/0/signal.kill
>
> I've reworked Cedric's patches to use task_lock() to protect access to the
> task's cgroup.
>
> Paul, Pavel asked me to send these to Rafael next. They are patches to make
> the freezer useful for checkpoint/restart using cgroups so it would be nice
> to get an explicit [N]Ack from you first.
>
> Rafael, if Paul agrees, please consider applying these patches.
>
> Changes since v3:
> v4 (Almost all of these changes are confined to patch 3):
> Reworked the series to use task_lock() instead of RCU.
> Reworked the series to use write_string() and read_seq_string()
> cgroup methods.
FYI - This means these patches need Paul's patches introducing
write_string(). I can certainly restore the old code for .read
and .write, but I was anticipating write_string() making it into various
trees first. If that's not necessarily the case please let me know.
Cheers,
-Matt
^ permalink raw reply [flat|nested] 37+ messages in thread* Re: [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
2008-07-07 22:58 Matt Helsley
` (2 preceding siblings ...)
2008-07-07 23:02 ` Matt Helsley
@ 2008-07-08 3:31 ` KAMEZAWA Hiroyuki
3 siblings, 0 replies; 37+ messages in thread
From: KAMEZAWA Hiroyuki @ 2008-07-08 3:31 UTC (permalink / raw)
To: Matt Helsley; +Cc: Linux Containers, Linux-Kernel, linux-pm, Paul Menage
Hi, could I make brief questions ?
On Mon, 07 Jul 2008 15:58:23 -0700
Matt Helsley <matthltc@us.ibm.com> wrote:
> 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
>
I'm just curious.
1. When we see FREEZING and have to retry ?
While there are some threads which wait for some event ?
2. What happens when FROZEN threads are moved to other group ?
Can we move them ?
Can we wake them up (if it can be moved) ?
What operations are allowed to frozen threads ?
Thanks,
-Kame
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
@ 2008-07-07 22:58 Matt Helsley
0 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-07 22:58 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux Containers, Paul Menage, Linux-Kernel, Pavel Machek,
linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
This patchset reuses the container infrastructure and the swsusp freezer to
freeze a group of tasks.
The freezer subsystem in the container filesystem defines a file named
freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup.
Reading will return the current state.
* Examples of usage :
# mkdir /containers/freezer
# mount -t cgroup -ofreezer,signal 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
to kill all tasks in the container :
# echo 9 > /containers/0/signal.kill
I've reworked Cedric's patches to use task_lock() to protect access to the
task's cgroup.
Paul, Pavel asked me to send these to Rafael next. They are patches to make
the freezer useful for checkpoint/restart using cgroups so it would be nice
to get an explicit [N]Ack from you first.
Rafael, if Paul agrees, please consider applying these patches.
Changes since v3:
v4 (Almost all of these changes are confined to patch 3):
Reworked the series to use task_lock() instead of RCU.
Reworked the series to use write_string() and read_seq_string()
cgroup methods.
Fixed the race Paul Menage identified.
Fixed up check_if_frozen() to do more than just test the FROZEN
flag. In some cases tasks could be stopped (T) and marked
FREEZING. When that happens we can safely assume that it
will be frozen immediately upon waking up in the kernel.
Waiting for it to get marked with PF_FROZEN in order to
transition to the FROZEN state would block unnecessarily.
Removed freezer_ prefix from static functions in cgroup_freezer.c.
Simplified STATE_ switch.
Updated the locking comments.
v3:
Ported to 2.6.26-rc5-mm2 with Rafael's freezer patches
Tested on 24 combinations of 3 architectures (x86, x86_64, ppc64)
with 8 different kernel configs varying power management
and cgroup config variables. Each patch builds and boots
in these 24 combinations.
Passes functional testing.
v2 (roughly patches 3 and 5):
Moved the "kill" file into a separate cgroup subsystem (signal) and
it's own patch.
Changed the name of the file from freezer.freeze to freezer.state.
Switched from taking 1 and 0 as input to the strings "FROZEN" and
"RUNNING", respectively. This helps keep the interface
human-usable if/when we need to more states.
Checked that stopped or interrupted is "frozen enough"
Since try_to_freeze() is called upon wakeup of these tasks
this should be fine. This idea comes from recent changes to
the freezer.
Checked that if (task == current) whilst freezing cgroup we're ok
Fixed bug where -EBUSY would always be returned when freezing
Added code to handle userspace retries for any remaining -EBUSY
Cheers,
-Matt Helsley
--
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
@ 2008-07-07 22:58 Matt Helsley
0 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-07-07 22:58 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Linux Containers, Paul Menage, Linux-Kernel, linux-pm
This patchset reuses the container infrastructure and the swsusp freezer to
freeze a group of tasks.
The freezer subsystem in the container filesystem defines a file named
freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup.
Reading will return the current state.
* Examples of usage :
# mkdir /containers/freezer
# mount -t cgroup -ofreezer,signal 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
to kill all tasks in the container :
# echo 9 > /containers/0/signal.kill
I've reworked Cedric's patches to use task_lock() to protect access to the
task's cgroup.
Paul, Pavel asked me to send these to Rafael next. They are patches to make
the freezer useful for checkpoint/restart using cgroups so it would be nice
to get an explicit [N]Ack from you first.
Rafael, if Paul agrees, please consider applying these patches.
Changes since v3:
v4 (Almost all of these changes are confined to patch 3):
Reworked the series to use task_lock() instead of RCU.
Reworked the series to use write_string() and read_seq_string()
cgroup methods.
Fixed the race Paul Menage identified.
Fixed up check_if_frozen() to do more than just test the FROZEN
flag. In some cases tasks could be stopped (T) and marked
FREEZING. When that happens we can safely assume that it
will be frozen immediately upon waking up in the kernel.
Waiting for it to get marked with PF_FROZEN in order to
transition to the FROZEN state would block unnecessarily.
Removed freezer_ prefix from static functions in cgroup_freezer.c.
Simplified STATE_ switch.
Updated the locking comments.
v3:
Ported to 2.6.26-rc5-mm2 with Rafael's freezer patches
Tested on 24 combinations of 3 architectures (x86, x86_64, ppc64)
with 8 different kernel configs varying power management
and cgroup config variables. Each patch builds and boots
in these 24 combinations.
Passes functional testing.
v2 (roughly patches 3 and 5):
Moved the "kill" file into a separate cgroup subsystem (signal) and
it's own patch.
Changed the name of the file from freezer.freeze to freezer.state.
Switched from taking 1 and 0 as input to the strings "FROZEN" and
"RUNNING", respectively. This helps keep the interface
human-usable if/when we need to more states.
Checked that stopped or interrupted is "frozen enough"
Since try_to_freeze() is called upon wakeup of these tasks
this should be fine. This idea comes from recent changes to
the freezer.
Checked that if (task == current) whilst freezing cgroup we're ok
Fixed bug where -EBUSY would always be returned when freezing
Added code to handle userspace retries for any remaining -EBUSY
Cheers,
-Matt Helsley
--
^ permalink raw reply [flat|nested] 37+ messages in thread
* [patch 0/4] Container Freezer: Reuse Suspend Freezer
@ 2008-06-24 13:58 Matt Helsley
0 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-06-24 13:58 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Linux Containers, Paul Menage, Linux-Kernel, linux-pm
This patchset reuses the container infrastructure and the swsusp freezer to
freeze a group of tasks.
The freezer subsystem in the container filesystem defines a file named
freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup.
Reading will return the current state.
* Examples of usage :
# mkdir /containers/freezer
# mount -t cgroup -ofreezer,signal 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
to kill all tasks in the container :
# echo 9 > /containers/0/signal.kill
I've taken Cedric's patches, forward-ported them to 2.6.26-rc5-mm2 + Rafael's
NOSIG patches.
Paul, Pavel asked me to send these to Rafael next. They are patches to make
the freezer useful for checkpoint/restart using cgroups so it would be nice
to get an explicit [N]Ack from you first.
Rafael, if Paul agrees, please consider applying these patches.
Changes since v2:
v3:
Ported to 2.6.26-rc5-mm2 with Rafael's freezer patches
Tested on 24 combinations of 3 architectures (x86, x86_64, ppc64)
with 8 different kernel configs varying power management
and cgroup config variables. Each patch builds and boots
in these 24 combinations.
Passes functional testing.
v2 (roughly patches 3 and 5):
Moved the "kill" file into a separate cgroup subsystem (signal) and
it's own patch.
Changed the name of the file from freezer.freeze to freezer.state.
Switched from taking 1 and 0 as input to the strings "FROZEN" and
"RUNNING", respectively. This helps keep the interface
human-usable if/when we need to more states.
Checked that stopped or interrupted is "frozen enough"
Since try_to_freeze() is called upon wakeup of these tasks
this should be fine. This idea comes from recent changes to
the freezer.
Checked that if (task == current) whilst freezing cgroup we're ok
Fixed bug where -EBUSY would always be returned when freezing
Added code to handle userspace retries for any remaining -EBUSY
Cheers,
-Matt Helsley
--
^ permalink raw reply [flat|nested] 37+ messages in thread
* [patch 0/4] Container Freezer: Reuse Suspend Freezer
@ 2008-06-24 13:58 Matt Helsley
0 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-06-24 13:58 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux Containers, Paul Menage, Linux-Kernel, Pavel Machek,
linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
This patchset reuses the container infrastructure and the swsusp freezer to
freeze a group of tasks.
The freezer subsystem in the container filesystem defines a file named
freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup.
Reading will return the current state.
* Examples of usage :
# mkdir /containers/freezer
# mount -t cgroup -ofreezer,signal 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
to kill all tasks in the container :
# echo 9 > /containers/0/signal.kill
I've taken Cedric's patches, forward-ported them to 2.6.26-rc5-mm2 + Rafael's
NOSIG patches.
Paul, Pavel asked me to send these to Rafael next. They are patches to make
the freezer useful for checkpoint/restart using cgroups so it would be nice
to get an explicit [N]Ack from you first.
Rafael, if Paul agrees, please consider applying these patches.
Changes since v2:
v3:
Ported to 2.6.26-rc5-mm2 with Rafael's freezer patches
Tested on 24 combinations of 3 architectures (x86, x86_64, ppc64)
with 8 different kernel configs varying power management
and cgroup config variables. Each patch builds and boots
in these 24 combinations.
Passes functional testing.
v2 (roughly patches 3 and 5):
Moved the "kill" file into a separate cgroup subsystem (signal) and
it's own patch.
Changed the name of the file from freezer.freeze to freezer.state.
Switched from taking 1 and 0 as input to the strings "FROZEN" and
"RUNNING", respectively. This helps keep the interface
human-usable if/when we need to more states.
Checked that stopped or interrupted is "frozen enough"
Since try_to_freeze() is called upon wakeup of these tasks
this should be fine. This idea comes from recent changes to
the freezer.
Checked that if (task == current) whilst freezing cgroup we're ok
Fixed bug where -EBUSY would always be returned when freezing
Added code to handle userspace retries for any remaining -EBUSY
Cheers,
-Matt Helsley
--
^ permalink raw reply [flat|nested] 37+ messages in thread
* [patch 0/4] Container Freezer: Reuse Suspend Freezer
@ 2008-06-24 13:58 Matt Helsley
0 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-06-24 13:58 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Paul Menage, Pavel Machek, Linux-Kernel, linux-pm,
Linux Containers
This patchset reuses the container infrastructure and the swsusp freezer to
freeze a group of tasks.
The freezer subsystem in the container filesystem defines a file named
freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup.
Reading will return the current state.
* Examples of usage :
# mkdir /containers/freezer
# mount -t cgroup -ofreezer,signal 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
to kill all tasks in the container :
# echo 9 > /containers/0/signal.kill
I've taken Cedric's patches, forward-ported them to 2.6.26-rc5-mm2 + Rafael's
NOSIG patches.
Paul, Pavel asked me to send these to Rafael next. They are patches to make
the freezer useful for checkpoint/restart using cgroups so it would be nice
to get an explicit [N]Ack from you first.
Rafael, if Paul agrees, please consider applying these patches.
Changes since v2:
v3:
Ported to 2.6.26-rc5-mm2 with Rafael's freezer patches
Tested on 24 combinations of 3 architectures (x86, x86_64, ppc64)
with 8 different kernel configs varying power management
and cgroup config variables. Each patch builds and boots
in these 24 combinations.
Passes functional testing.
v2 (roughly patches 3 and 5):
Moved the "kill" file into a separate cgroup subsystem (signal) and
it's own patch.
Changed the name of the file from freezer.freeze to freezer.state.
Switched from taking 1 and 0 as input to the strings "FROZEN" and
"RUNNING", respectively. This helps keep the interface
human-usable if/when we need to more states.
Checked that stopped or interrupted is "frozen enough"
Since try_to_freeze() is called upon wakeup of these tasks
this should be fine. This idea comes from recent changes to
the freezer.
Checked that if (task == current) whilst freezing cgroup we're ok
Fixed bug where -EBUSY would always be returned when freezing
Added code to handle userspace retries for any remaining -EBUSY
Cheers,
-Matt Helsley
--
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH 0/4] Container Freezer: Reuse Suspend Freezer
@ 2008-04-03 0:15 Matt Helsley
0 siblings, 0 replies; 37+ messages in thread
From: Matt Helsley @ 2008-04-03 0:15 UTC (permalink / raw)
To: Linux-Kernel; +Cc: linux-pm, Cedric Le Goater
This patchset is a prototype using the container infrastructure and
the swsusp freezer to freeze a group of tasks. I've merely taken Cedric's
patches, forward-ported them to 2.6.25-rc8-mm1 and done a small amount of
testing.
2 files are defined by the freezer subsystem in the container
filesystem :
* "freezer.freeze"
writing 1 will freeze all tasks and 0 unfreeze
reading will return the status of the freezer
* "freezer.kill"
writing <n> will send signal number <n> to all tasks
* Usage :
# mkdir /containers/freezer
# mount -t container -ofreezer freezer /containers/freezer
# mkdir /containers/freezer/0
# echo $some_pid > /containers/freezer/0/tasks
to get status of the freezer subsystem :
# cat /containers/freezer/0/freezer.freeze
RUNNING
to freeze all tasks in the container :
# echo 1 > /containers/freezer/0/freezer.freeze
# cat /containers/freezer/0/freezer.freeze
FREEZING
# cat /containers/freezer/0/freezer.freeze
FROZEN
to unfreeze all tasks in the container :
# echo 1 > /containers/freezer/0/freezer.freeze
# cat /containers/freezer/0/freezer.freeze
RUNNING
to kill all tasks in the container :
# echo 9 > /containers/freezer/0/freezer.kill
* Caveats:
- the FROZEN status is calculated and changed when the container
file "freezer.freeze" is read.
- frozen containers will be unfrozen when a system is resumed after
a suspend. This is addressed by the last patch.
* Series
Applies to 2.6.25-rc8-mm1
The first patches make the freezer available to all architectures
before implementing the freezer subsystem.
[PATCH 1/4] Add TIF_FREEZE flag to all architectures
[PATCH 2/4] Make refrigerator always available
[PATCH 3/4] Implement freezer cgroup subsystem
[PATCH 4/4] Skip frozen cgroups during power management resume
Each patch compiles, boots, and survives basic LTP containers and controllers
tests.
Comments are welcome.
Cheers,
-Matt Helsley
--
^ permalink raw reply [flat|nested] 37+ messages in thread
end of thread, other threads:[~2008-07-10 15:44 UTC | newest]
Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080403001529.052250759@us.ibm.com>
2008-04-03 0:15 ` [PATCH 1/4] Container Freezer: Add TIF_FREEZE flag to all architectures Matt Helsley
2008-04-03 0:15 ` [PATCH 2/4] Container Freezer: Make refrigerator always available Matt Helsley
2008-04-03 0:15 ` [PATCH 3/4] Container Freezer: Implement freezer cgroup subsystem Matt Helsley
2008-04-03 0:15 ` [PATCH 4/4] Container Freezer: Skip frozen cgroups during power management resume Matt Helsley
2008-04-03 0:19 ` [PATCH 0/4] Container Freezer: Reuse Suspend Freezer Matt Helsley
2008-04-03 0:19 ` Matt Helsley
2008-07-07 22:58 Matt Helsley
[not found] ` <20080707225823.502032693-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-07-07 23:02 ` Matt Helsley
2008-07-08 3:31 ` KAMEZAWA Hiroyuki
2008-07-08 3:31 ` KAMEZAWA Hiroyuki
2008-07-08 19:39 ` Matt Helsley
[not found] ` <1215545954.9023.120.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-07-08 20:06 ` Paul Menage
2008-07-08 20:06 ` Paul Menage
2008-07-08 20:06 ` Paul Menage
[not found] ` <6599ad830807081306l61622eadk215a25d02ee94b00-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-08 20:07 ` Paul Menage
2008-07-08 20:07 ` Paul Menage
2008-07-09 21:58 ` Matt Helsley
[not found] ` <1215640723.7149.35.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-07-10 0:42 ` KAMEZAWA Hiroyuki
2008-07-10 0:42 ` KAMEZAWA Hiroyuki
2008-07-10 0:42 ` KAMEZAWA Hiroyuki
2008-07-10 14:40 ` Serge E. Hallyn
[not found] ` <20080710094231.58d9e1b9.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-10 14:40 ` Serge E. Hallyn
2008-07-10 14:40 ` Serge E. Hallyn
2008-07-09 21:58 ` Matt Helsley
[not found] ` <6599ad830807081307j811689aldf0f6cb38579c450-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-09 21:58 ` Matt Helsley
2008-07-08 20:07 ` Paul Menage
2008-07-08 19:39 ` Matt Helsley
[not found] ` <20080708123150.3034d83f.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-08 19:39 ` Matt Helsley
2008-07-07 23:02 ` Matt Helsley
2008-07-07 23:02 ` Matt Helsley
2008-07-08 3:31 ` KAMEZAWA Hiroyuki
-- strict thread matches above, loose matches on Subject: below --
2008-07-07 22:58 Matt Helsley
2008-07-07 22:58 Matt Helsley
2008-06-24 13:58 [patch " Matt Helsley
2008-06-24 13:58 Matt Helsley
2008-06-24 13:58 Matt Helsley
2008-04-03 0:15 [PATCH " Matt Helsley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.