All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
To: jacob pan <jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: container cgroup
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org,
	Cedric Le Goater <clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>,
	Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Arjan van de Ven <arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org
Subject: Re: [PATCH 1/1, v6] cgroup/freezer: add per freezer duty ratio control
Date: Thu, 10 Feb 2011 09:26:08 +0800	[thread overview]
Message-ID: <4D533EB0.6060405__48326.5451192439$1297301132$gmane$org@cn.fujitsu.com> (raw)
In-Reply-To: <20110209101631.5f265687@jacob-laptop>

jacob pan wrote:
> On Wed, 09 Feb 2011 11:07:59 +0800
> Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> wrote:
> 
>> jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org wrote:
>>> From: Jacob Pan <jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>>>
>>> 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.

  reply	other threads:[~2011-02-10  1:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09  1:05 [PATCH 1/1, v6] cgroup/freezer: add per freezer duty ratio control jacob.jun.pan
2011-02-09  3:07 ` Li Zefan
2011-02-09 18:16   ` jacob pan
2011-02-10  1:26     ` Li Zefan [this message]
2011-02-10  1:26     ` Li Zefan
2011-02-10  4:43       ` jacob pan
     [not found]       ` <4D533EB0.6060405-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-02-10  4:43         ` jacob pan
     [not found]   ` <4D52050F.3060907-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-02-09 18:16     ` jacob pan
2011-02-10  4:51     ` jacob pan
2011-02-10  4:51   ` jacob pan
2011-02-10  3:04 ` Matt Helsley
2011-02-10  3:06   ` Arjan van de Ven
2011-02-10 19:11     ` Matt Helsley
2011-02-10 22:22       ` jacob pan
2011-02-10 22:43         ` Matt Helsley
2011-02-10 22:43         ` Matt Helsley
     [not found]       ` <20110210191117.GI16432-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2011-02-10 22:22         ` jacob pan
     [not found]     ` <4D535627.9090606-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2011-02-10 19:11       ` Matt Helsley
2011-02-14 18:03       ` Vaidyanathan Srinivasan
2011-02-14 18:03     ` Vaidyanathan Srinivasan
2011-02-10  9:15   ` Kirill A. Shutemov
2011-02-10 18:58     ` Matt Helsley
     [not found]     ` <20110210091522.GA28511-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-02-10 18:58       ` Matt Helsley
2011-02-10 23:06   ` Jacob Pan
     [not found]   ` <20110210030442.GG16432-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2011-02-10  3:06     ` Arjan van de Ven
2011-02-10  9:15     ` Kirill A. Shutemov
2011-02-10 23:06     ` Jacob Pan
     [not found] ` <1297213541-18156-1-git-send-email-jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2011-02-09  3:07   ` Li Zefan
2011-02-10  3:04   ` Matt Helsley
2011-02-09  1:05 jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='4D533EB0.6060405__48326.5451192439$1297301132$gmane$org@cn.fujitsu.com' \
    --to=lizf-bthxqxjhjhxqfuhtdcdx3a@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.