OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH 1/1, v6] cgroup/freezer: add per freezer duty ratio control
Re: [PATCH 1/1, v6] cgroup/freezer: add per freezer duty ratio control [message #41604] Thu, 10 February 2011 01:26 Go to next message
Li Zefan is currently offline  Li Zefan
Messages: 90
Registered: February 2008
Member
jacob pan wrote:
> On Wed, 09 Feb 2011 11:07:59 +0800
> Li Zefan <lizf@cn.fujitsu.com> wrote:
>
>> 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
>>>
>>> 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?
>

You're right. I made a mistake when looking into the patch.

btw, I made a few other comments in your code, that you may have
overlooked.
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containe rs
Re: [PATCH 1/1, v6] cgroup/freezer: add per freezer duty ratio control [message #42066 is a reply to message #41604] Thu, 10 February 2011 04:43 Go to previous message
jacob.jun.pan is currently offline  jacob.jun.pan
Messages: 40
Registered: December 2010
Member
On Thu, 10 Feb 2011 09:26:08 +0800
Li Zefan <lizf@cn.fujitsu.com> wrote:

> jacob pan wrote:
> > On Wed, 09 Feb 2011 11:07:59 +0800
> > Li Zefan <lizf@cn.fujitsu.com> wrote:
> >
> >> 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
> >>>
> >>> 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?
> >
>
> You're right. I made a mistake when looking into the patch.
>
> btw, I made a few other comments in your code, that you may have
> overlooked.
sorry, I missed them.
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containe rs
Previous Topic: [PATCH, v4 0/2] Timer slack cgroup subsystem
Next Topic: Re: [PATCH 1/1, v6] cgroup/freezer: add per freezer duty ratio control
Goto Forum:
  


Current Time: Wed May 01 14:55:39 GMT 2024

Total time taken to generate the page: 0.01806 seconds