container freezer: skip frozen cgroups during power management resume
Matt Helsley [Sun, 19 Oct 2008 03:27:22 +0000 (20:27 -0700)]
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>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

kernel/power/process.c

index 444cea8..ca63401 100644 (file)
@@ -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);