All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc@us.ibm.com>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: Matt Helsley <matthltc@us.ibm.com>,
	jacob.jun.pan@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 11:11:17 -0800	[thread overview]
Message-ID: <20110210191117.GI16432@count0.beaverton.ibm.com> (raw)
In-Reply-To: <4D535627.9090606@linux.intel.com>

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.

> the objective is to have the CPU idle, without wakeups, for that long...
> (to save power)

Hmm. Maybe these need some "scheduler slack" so that when they're
runnable they'll either run with other scheduled entities that are
keeping the cpu awake or wait until the slack runs out before doing
a wakeup. Then you can toss this in the cgroup timer slack subsystem
and rename it to the "wakeup slack" subsystem or something. That
will probably get you better race-to-idle behavior, avoid/reduce 
latencies added by duty cycles, and avoid shoehorning into the cgroup
freezer subsystem. Of course it would require some scheduler hacking
which will probably be much more controversial than modifying a cgroup
subsystem :).

Cheers,
	-Matt Helsley

  reply	other threads:[~2011-02-10 19:11 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
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 [this message]
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=20110210191117.GI16432@count0.beaverton.ibm.com \
    --to=matthltc@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=clg@vnet.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.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 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.