From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751513AbYDXGsw (ORCPT ); Thu, 24 Apr 2008 02:48:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751197AbYDXGsM (ORCPT ); Thu, 24 Apr 2008 02:48:12 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:49251 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272AbYDXGsH (ORCPT ); Thu, 24 Apr 2008 02:48:07 -0400 Message-Id: <20080424064757.815137502@us.ibm.com> References: <20080424064756.643890130@us.ibm.com> User-Agent: quilt/0.46-1 Date: Wed, 23 Apr 2008 23:48:00 -0700 From: Matt Helsley To: Linux-Kernel Cc: Cedric Le Goater , Paul Menage , Oren Laadan , Linus Torvalds , Pavel Machek , linux-pm@lists.linux-foundation.org, Linux Containers Subject: [RFC][PATCH 4/5] 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 --- kernel/power/process.c | 4 ++++ 1 file changed, 4 insertions(+) Index: linux-2.6.25-mm1/kernel/power/process.c =================================================================== --- linux-2.6.25-mm1.orig/kernel/power/process.c +++ linux-2.6.25-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); } --