Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755495Ab1BISQe (ORCPT ); Wed, 9 Feb 2011 13:16:34 -0500 Received: from mga09.intel.com ([134.134.136.24]:65440 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755044Ab1BISQd (ORCPT ); Wed, 9 Feb 2011 13:16:33 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.60,446,1291622400"; d="scan'208";a="601031212" Date: Wed, 9 Feb 2011 10:16:31 -0800 From: jacob pan To: Li Zefan Cc: LKML , "Kirill A. Shutemov" , Arjan van de Ven , Matt Helsley , container cgroup , Paul Menage , akpm@linux-foundation.org, rdunlap@xenotime.net, Cedric Le Goater Subject: Re: [PATCH 1/1, v6] cgroup/freezer: add per freezer duty ratio control Message-ID: <20110209101631.5f265687@jacob-laptop> In-Reply-To: <4D52050F.3060907@cn.fujitsu.com> References: <1297213541-18156-1-git-send-email-jacob.jun.pan@linux.intel.com> <4D52050F.3060907@cn.fujitsu.com> Organization: OTC X-Mailer: Claws Mail 3.7.4 (GTK+ 2.20.1; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1782 Lines: 46 On Wed, 09 Feb 2011 11:07:59 +0800 Li Zefan wrote: > jacob.jun.pan@linux.intel.com wrote: > > From: Jacob Pan > > > > Freezer subsystem is used to manage batch jobs which can start > > stop at the same time. However, sometime it is desirable to let > > the kernel manage the freezer state automatically with a given > > duty ratio. > > For example, if we want to reduce the time that backgroup apps > > are allowed to run we can put them into a freezer subsystem and > > set the kernel to turn them THAWED/FROZEN at given duty ratio. > > > > This patch introduces two file nodes under cgroup > > freezer.duty_ratio_pct and freezer.period_sec > > > > Usage example: set period to be 5 seconds and frozen duty ratio 90% > > [root@localhost aoa]# echo 90 > freezer.duty_ratio_pct > > [root@localhost aoa]# echo 5000 > freezer.period_ms > > > > So after: > > # echo FROZEN > freezer.state > # echo 90 > freezer.duty_ratio_pct > # echo 5000 > freezer.period_ms > ... > # echo 0 > freezer.duty_ratio_pct > > All the tasks in this cgroup are in THAWED state, but the cgroup is > in FROZEN state. This should be fixed. I don't know how could this ever happen. Is it based on your testing? Whenever tasks in a cgroup are thawed/frozen, its freezer state would change accordingly. After your example, freezer.state should have THAWED. It matches user's intention, i.e. if a user do echo 0 > freezer.duty_ratio_pct It must want 0% to be frozen, which is THAWED. Am I missing anything? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/