container freezer: skip frozen cgroups during power management resume
authorMatt Helsley <matthltc@us.ibm.com>
Sun, 19 Oct 2008 03:27:22 +0000 (20:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Oct 2008 15:52:34 +0000 (08:52 -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 444cea80fde86b5f72a9237b9f83f2af324836b8..ca634019497a5cf8b035872bdaf8edcfaefd8b88 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);