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 <[email protected]>
Signed-off-by: Matt Helsley <[email protected]>
Acked-by: Serge E. Hallyn <[email protected]>
Tested-by: Matt Helsley <[email protected]>
---
kernel/power/process.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/power/process.c b/kernel/power/process.c
index 444cea8..ce9e280 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/syscalls.h>
#include <linux/freezer.h>
+#include <linux/cgroup_freezer.h>
/*
* Timeout for stopping processes
@@ -135,6 +136,9 @@ static void thaw_tasks(bool nosig_only)
if (nosig_only && should_send_signal(p))
continue;
+ if (cgroup_frozen(p))
+ continue;
+
thaw_process(p);
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
--
1.5.3.7
--
Hi.
On Thu, 2008-07-31 at 22:07 -0700, Matt Helsley wrote:
> 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 <[email protected]>
> Signed-off-by: Matt Helsley <[email protected]>
> Acked-by: Serge E. Hallyn <[email protected]>
> Tested-by: Matt Helsley <[email protected]>
I understand the freezer pretty well, so maybe I can help a little.
Acked-by: Nigel Cunningham <[email protected]>
> ---
> kernel/power/process.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/power/process.c b/kernel/power/process.c
> index 444cea8..ce9e280 100644
> --- a/kernel/power/process.c
> +++ b/kernel/power/process.c
> @@ -13,6 +13,7 @@
> #include <linux/module.h>
> #include <linux/syscalls.h>
> #include <linux/freezer.h>
> +#include <linux/cgroup_freezer.h>
>
> /*
> * Timeout for stopping processes
> @@ -135,6 +136,9 @@ static void thaw_tasks(bool nosig_only)
> if (nosig_only && should_send_signal(p))
> continue;
>
> + if (cgroup_frozen(p))
> + continue;
> +
> thaw_process(p);
> } while_each_thread(g, p);
> read_unlock(&tasklist_lock);
> --
> 1.5.3.7
>