All of lore.kernel.org
 help / color / mirror / Atom feed
From: jacob pan <jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Cedric Le Goater <clg-DhXWPJtHtuFWk0Htik3J/w@public.gmane.org>,
	container cgroup
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Wysocki Rafael Wysocki <rjw-KKrjLPT3xs0@public.gmane.org>,
	rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@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 14:22:21 -0800	[thread overview]
Message-ID: <20110210142221.6b984e45__13901.1840722107$1297376695$gmane$org@jacob-laptop> (raw)
In-Reply-To: <20110210191117.GI16432-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>

On Thu, 10 Feb 2011 11:11:17 -0800
Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> 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-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
> > >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.

  parent reply	other threads:[~2011-02-10 22:22 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
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 [this message]
     [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='20110210142221.6b984e45__13901.1840722107$1297376695$gmane$org@jacob-laptop' \
    --to=jacob.jun.pan-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=arjan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=clg-DhXWPJtHtuFWk0Htik3J/w@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org \
    --cc=rjw-KKrjLPT3xs0@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.