From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Helsley Subject: [PATCH 4/4] Container Freezer: Skip frozen cgroups during power management resume Date: Wed, 02 Apr 2008 17:15:33 -0700 Message-ID: <24220.5618335449$1207235052@news.gmane.org> References: <20080403001529.052250759@us.ibm.com>> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline; filename=cgroup-freezer/cgroup-freezer-do-not-unfreeze-a-frozen-cgroup-when-system-is-resumed.patch List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Linux-Kernel Cc: linux-pm@lists.linux-foundation.org, Cedric Le Goater List-Id: linux-pm@vger.kernel.org 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 Signed-off-by: Matt Helsley Tested-by: Matt Helsley 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 #include #include #include #include +#include /* * 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); } --