OpenVZ Forum - RDF feed
type: channel
items: Re: [PATCH 1/1, v7] cgroup/freezer: add per freezer duty ratio control

Re: [PATCH 1/1, v7] cgroup/freezer: add per freezer duty ratio control
type: item
description: On Fri, Feb 11, 2011 at 11:10:44AM -0800, jacob.jun.pan@linux.intel.com wrote: > From: Jacob Pan <jacob.jun.pan@linux.intel.com> > > 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 Again: I don't think this is the right approach in the long term. It would be better not to add this interface and instead enable the cpu cgroup subsystem for non-rt tasks using a similar duty ratio concept.. Nevertheless, I've added some feedback on the code for you here :). > > 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 > > Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> > --- > Documentation/cgroups/freezer-subsystem.txt | 23 ++++ > kernel/cgroup_freezer.c | 153 ++++++++++++++++++++++++++- > 2 files changed, 174 insertions(+), 2 deletions(-) > > diff --git a/Documentation/cgroups/freezer-subsystem.txt b/Documentation/cgroups/freezer-subsystem.txt > index 41f37fe..2022b32 100644 > --- a/Documentation/cgroups/freezer-subsystem.txt > +++ b/Documentation/cgroups/freezer-subsystem.txt > @@ -100,3 +100,26 @@ things happens: > and returns EINVAL) > 3) The tasks that blocked the cgroup from entering the "FROZEN" > state disappear from the cgroup's set of tasks. > + > +In embedded systems, it is desirable to manage group of applications > +for power saving. E.g. tasks that are not in the foreground may be > +frozen and unfrozen periodically to save power without affecting user > +experience. In this cas…
creator: Matt Helsley
date: 2011-02-12T23:29:07-00:00

Re: [PATCH 1/1, v7] cgroup/freezer: add per freezer duty ratio control
type: item
description: On Sat, 12 Feb 2011 15:29:07 -0800 Matt Helsley <matthltc@us.ibm.com> wrote: > On Fri, Feb 11, 2011 at 11:10:44AM -0800, jacob.jun.pan@linux.intel.com wrote: > > From: Jacob Pan <jacob.jun.pan@linux.intel.com> > > > > 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 > > Again: I don't think this is the right approach in the long term. > It would be better not to add this interface and instead enable the > cpu cgroup subsystem for non-rt tasks using a similar duty ratio > concept.. > > Nevertheless, I've added some feedback on the code for you here :). > AFAIK, there was a work for bandwidth control in CFS. http://linux.derkeiler.com/Mailing-Lists/Kernel/2010-10/msg0 4335.html I tested this and worked fine. This schduler approach seems better for my purpose to limit bandwidth of apprications rather than freezer. BTW, isn't period_sec too large ? Thanks, -Kame _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containe rs
creator: KAMEZAWA Hiroyuki
date: 2011-02-14T00:44:02-00:00

Re: [PATCH 1/1, v7] cgroup/freezer: add per freezer duty ratio control
type: item
description: On 2/13/2011 4:44 PM, KAMEZAWA Hiroyuki wrote: > On Sat, 12 Feb 2011 15:29:07 -0800 > Matt Helsley<matthltc@us.ibm.com> wrote: > >> On Fri, Feb 11, 2011 at 11:10:44AM -0800, jacob.jun.pan@linux.intel.com wrote: >>> From: Jacob Pan<jacob.jun.pan@linux.intel.com> >>> >>> 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 >> Again: I don't think this is the right approach in the long term. >> It would be better not to add this interface and instead enable the >> cpu cgroup subsystem for non-rt tasks using a similar duty ratio >> concept.. >> >> Nevertheless, I've added some feedback on the code for you here :). >> > AFAIK, there was a work for bandwidth control in CFS. > > http://linux.derkeiler.com/Mailing-Lists/Kernel/2010-10/msg0 4335.html > > I tested this and worked fine. This schduler approach seems better for > my purpose to limit bandwidth of apprications rather than freezer. for our purpose, it's not about bandwidth. it's about making sure the class of apps don't run for a long period (30-second range) of time. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containe rs
creator: Arjan van de Ven
date: 2011-02-14T03:23:10-00:00

Re: [PATCH 1/1, v7] cgroup/freezer: add per freezer duty ratio control
type: item
description: On Sat, 12 Feb 2011 15:29:07 -0800 Matt Helsley <matthltc@us.ibm.com> wrote: > On Fri, Feb 11, 2011 at 11:10:44AM -0800, > jacob.jun.pan@linux.intel.com wrote: > > From: Jacob Pan <jacob.jun.pan@linux.intel.com> > > > > 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 > > Again: I don't think this is the right approach in the long term. > It would be better not to add this interface and instead enable the > cpu cgroup subsystem for non-rt tasks using a similar duty ratio > concept.. > > Nevertheless, I've added some feedback on the code for you here :). > Thanks for the thorough review, really appreciated. > > > > 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 > > > > Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> > > --- > > Documentation/cgroups/freezer-subsystem.txt | 23 ++++ > > kernel/cgroup_freezer.c | 153 > > ++++++++++++++++++++++++++- 2 files changed, 174 insertions(+), 2 > > deletions(-) > > > > diff --git a/Documentation/cgroups/freezer-subsystem.txt > > b/Documentation/cgroups/freezer-subsystem.txt index > > 41f37fe..2022b32 100644 --- > > a/Documentation/cgroups/freezer-subsystem.txt +++ > > b/Documentation/cgroups/freezer-subsystem.txt @@ -100,3 +100,26 @@ > > things happens: and returns EINVAL) > > 3) The tasks that blocked the cgroup from entering the > > "FROZEN" state disappear from the cgroup's set of tasks. > > + > > +In embedded systems…
creator: jacob.jun.pan
date: 2011-02-14T19:41:42-00:00

Re: [PATCH 1/1, v7] cgroup/freezer: add per freezer duty ratio control
type: item
description: On Sun, 13 Feb 2011 19:23:10 -0800 Arjan van de Ven <arjan@linux.intel.com> wrote: > On 2/13/2011 4:44 PM, KAMEZAWA Hiroyuki wrote: > > On Sat, 12 Feb 2011 15:29:07 -0800 > > Matt Helsley<matthltc@us.ibm.com> wrote: > > > >> On Fri, Feb 11, 2011 at 11:10:44AM -0800, jacob.jun.pan@linux.intel.com wrote: > >>> From: Jacob Pan<jacob.jun.pan@linux.intel.com> > >>> > >>> 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 > >> Again: I don't think this is the right approach in the long term. > >> It would be better not to add this interface and instead enable the > >> cpu cgroup subsystem for non-rt tasks using a similar duty ratio > >> concept.. > >> > >> Nevertheless, I've added some feedback on the code for you here :). > >> > > AFAIK, there was a work for bandwidth control in CFS. > > > > http://linux.derkeiler.com/Mailing-Lists/Kernel/2010-10/msg0 4335.html > > > > I tested this and worked fine. This schduler approach seems better for > > my purpose to limit bandwidth of apprications rather than freezer. > > for our purpose, it's not about bandwidth. > it's about making sure the class of apps don't run for a long period > (30-second range) of time. > The discussion about this patchset seems to have been upside-down: lots of talk about a particular implementation, with people walking back from the implemetnation trying to work out what the requirements were, then seeing if other implementations might suit those requirements. Whatever they were. I think it would be helpful to start again…
creator: akpm
date: 2011-02-14T23:07:30-00:00

Re: [PATCH 1/1, v7] cgroup/freezer: add per freezer duty ratio control
type: item
description: On Mon, 14 Feb 2011 15:07:30 -0800 Andrew Morton <akpm@linux-foundation.org> wrote: > On Sun, 13 Feb 2011 19:23:10 -0800 > Arjan van de Ven <arjan@linux.intel.com> wrote: > > > On 2/13/2011 4:44 PM, KAMEZAWA Hiroyuki wrote: > > > On Sat, 12 Feb 2011 15:29:07 -0800 > > > Matt Helsley<matthltc@us.ibm.com> wrote: > > > > > >> On Fri, Feb 11, 2011 at 11:10:44AM -0800, jacob.jun.pan@linux.intel.com wrote: > > >>> From: Jacob Pan<jacob.jun.pan@linux.intel.com> > > >>> > > >>> 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 > > >> Again: I don't think this is the right approach in the long term. > > >> It would be better not to add this interface and instead enable the > > >> cpu cgroup subsystem for non-rt tasks using a similar duty ratio > > >> concept.. > > >> > > >> Nevertheless, I've added some feedback on the code for you here :). > > >> > > > AFAIK, there was a work for bandwidth control in CFS. > > > > > > http://linux.derkeiler.com/Mailing-Lists/Kernel/2010-10/msg0 4335.html > > > > > > I tested this and worked fine. This schduler approach seems better for > > > my purpose to limit bandwidth of apprications rather than freezer. > > > > for our purpose, it's not about bandwidth. > > it's about making sure the class of apps don't run for a long period > > (30-second range) of time. > > > > The discussion about this patchset seems to have been upside-down: lots > of talk about a particular implementation, with people walking back > from the implemetnation trying to…
creator: KAMEZAWA Hiroyuki
date: 2011-02-15T02:18:57-00:00

Re: [PATCH 1/1, v7] cgroup/freezer: add per freezer duty ratio control
type: item
description: On Tue, 15 Feb 2011 11:18:57 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote: > On Mon, 14 Feb 2011 15:07:30 -0800 > Andrew Morton <akpm@linux-foundation.org> wrote: > > > On Sun, 13 Feb 2011 19:23:10 -0800 > > Arjan van de Ven <arjan@linux.intel.com> wrote: > > > > > On 2/13/2011 4:44 PM, KAMEZAWA Hiroyuki wrote: > > > > On Sat, 12 Feb 2011 15:29:07 -0800 > > > > Matt Helsley<matthltc@us.ibm.com> wrote: > > > > > > > >> On Fri, Feb 11, 2011 at 11:10:44AM -0800, > > > >> jacob.jun.pan@linux.intel.com wrote: > > > >>> From: Jacob Pan<jacob.jun.pan@linux.intel.com> > > > >>> > > > >>> 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 > > > >> Again: I don't think this is the right approach in the long > > > >> term. It would be better not to add this interface and instead > > > >> enable the cpu cgroup subsystem for non-rt tasks using a > > > >> similar duty ratio concept.. > > > >> > > > >> Nevertheless, I've added some feedback on the code for you > > > >> here :). > > > >> > > > > AFAIK, there was a work for bandwidth control in CFS. > > > > > > > > http://linux.derkeiler.com/Mailing-Lists/Kernel/2010-10/msg0 4335.html > > > > > > > > I tested this and worked fine. This schduler approach seems > > > > better for my purpose to limit bandwidth of apprications rather > > > > than freezer. > > > > > > for our purpose, it's not about bandwidth. > > > it's about making sure the class of apps don't run for a long > > > period (30…
creator: jacob.jun.pan
date: 2011-02-16T18:11:42-00:00