2008-08-11 23:54:35

by Matt Helsley

[permalink] [raw]
Subject: [PATCH 4/5] Container Freezer: Skip frozen cgroups during power management resume

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 | 3 +++
1 file changed, 3 insertions(+)

Index: linux-2.6.27-rc1-mm1/kernel/power/process.c
===================================================================
--- linux-2.6.27-rc1-mm1.orig/kernel/power/process.c
+++ linux-2.6.27-rc1-mm1/kernel/power/process.c
@@ -135,6 +135,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);

--


2008-08-12 20:47:29

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 4/5] Container Freezer: Skip frozen cgroups during power management resume

On Tuesday, 12 of August 2008, 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]>

Acked-by: Rafael J. Wysocki <[email protected]>

> ---
> kernel/power/process.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> Index: linux-2.6.27-rc1-mm1/kernel/power/process.c
> ===================================================================
> --- linux-2.6.27-rc1-mm1.orig/kernel/power/process.c
> +++ linux-2.6.27-rc1-mm1/kernel/power/process.c
> @@ -135,6 +135,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);
>