From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760361AbYDCVEB (ORCPT ); Thu, 3 Apr 2008 17:04:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756505AbYDCVDW (ORCPT ); Thu, 3 Apr 2008 17:03:22 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:38495 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756226AbYDCVDT (ORCPT ); Thu, 3 Apr 2008 17:03:19 -0400 Message-Id: <20080403210317.442655956@us.ibm.com> References: <20080403210316.397506379@us.ibm.com> User-Agent: quilt/0.46-1 Date: Thu, 03 Apr 2008 14:03:20 -0700 From: matthltc@us.ibm.com To: Linux-Kernel Cc: Linux Containers , Cedric Le Goater , linux-pm@lists.linux-foundation.org Subject: [RFC PATCH 4/4] Container Freezer: Skip frozen cgroups during power management resume Content-Disposition: inline; filename=cgroup-freezer/cgroup-freezer-do-not-unfreeze-a-frozen-cgroup-when-system-is-resumed.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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); } --