mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: jacob pan <jacob.jun.pan@linux.intel.com>
To: Matt Helsley <matthltc@us.ibm.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	container cgroup <containers@lists.linux-foundation.org>,
	Li Zefan <lizf@cn.fujitsu.com>, Paul Menage <menage@google.com>,
	akpm@linux-foundation.org, rdunlap@xenotime.net,
	Cedric Le Goater <clg@vnet.ibm.com>,
	Wysocki Rafael Wysocki <rjw@sisk.pl>
Subject: Re: [PATCH 1/1, v6] cgroup/freezer: add per freezer duty ratio control
Date: Thu, 10 Feb 2011 14:22:21 -0800	[thread overview]
Message-ID: <20110210142221.6b984e45@jacob-laptop> (raw)
In-Reply-To: <20110210191117.GI16432@count0.beaverton.ibm.com>

On Thu, 10 Feb 2011 11:11:17 -0800
Matt Helsley <matthltc@us.ibm.com> wrote:

> On Wed, Feb 09, 2011 at 07:06:15PM -0800, Arjan van de Ven wrote:
> > On 2/9/2011 7:04 PM, Matt Helsley wrote:
> > >On Tue, Feb 08, 2011 at 05:05:41PM -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
> > >>
> > >>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
> > >I kept wondering how this was useful when we've got the "cpu"
> > >subsystem because for some reason "duty cycle" made me think this
> > >was a scheduling policy knob. In fact, I'm pretty sure it is -- it
> > >just happens to sometimes reduce power consumption.
> > >
> > >Have you tried using the cpu cgroup subsystem's share to see if it
> > >can have a similar effect?
> > 
> > does the cpu cgroup system work on a 20 to 30 second time window?
> 
> I don't think so -- it works directly with the scheduler IIRC.
> 
I played with cpu subsystem a little today, it is for real-time tasks
only. By data type of cpu.rt_period_us  cpu.rt_runtime_us, it
actually has a pretty long time window (35 mins, int type at usec
resolution).
For some reason, I could not even get cpu subsystem to work with RT
task to work on 38-rc2 kernel. Here is what I did
- mount and create cpu cgroup fs
- launch task with SCHED_RR
- attach task to my newly created cgroup
- adjust cpu.rt_period_us  cpu.rt_runtime_us
But it never changed percentage of runtime. The ask in the cpu cgroup
always run at 100% or more than the runtime_us as I specified. I have
tried both with system idle and background tasks.

I do agree that dealing with group scheduler directly might be more
natural. but the hurdle might be changing cpu subsystem to support
non-rt, and deal with scheduler heuristics.




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

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09  1:05 jacob.jun.pan
2011-02-09  3:07 ` Li Zefan
2011-02-09 18:16   ` jacob pan
2011-02-10  1:26     ` Li Zefan
2011-02-10  4:43       ` 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 [this message]
2011-02-10 22:43         ` Matt Helsley
2011-02-14 18:03     ` Vaidyanathan Srinivasan
2011-02-10  9:15   ` Kirill A. Shutemov
2011-02-10 18:58     ` Matt Helsley
2011-02-10 23:06   ` Jacob Pan

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=20110210142221.6b984e45@jacob-laptop \
    --to=jacob.jun.pan@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=clg@vnet.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=matthltc@us.ibm.com \
    --cc=menage@google.com \
    --cc=rdunlap@xenotime.net \
    --cc=rjw@sisk.pl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome