linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Matt Helsley <matthltc@us.ibm.com>
Cc: Paul Menage <menage@google.com>, Li Zefan <lizf@cn.fujitsu.com>,
	containers@lists.linux-foundation.org,
	jacob.jun.pan@linux.intel.com,
	Arjan van de Ven <arjan@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-api@vger.kernel.org
Subject: Re: [PATCH, v6 3/3] cgroups: introduce timer slack controller
Date: Tue, 15 Feb 2011 02:10:04 +0200	[thread overview]
Message-ID: <20110215001004.GA6644@shutemov.name> (raw)
In-Reply-To: <20110215000055.GR16432@count0.beaverton.ibm.com>

On Mon, Feb 14, 2011 at 04:00:55PM -0800, Matt Helsley wrote:
> On Tue, Feb 15, 2011 at 12:59:40AM +0200, Kirill A. Shutemov wrote:
> > On Mon, Feb 14, 2011 at 05:59:26AM -0800, Matt Helsley wrote:
> > > On Mon, Feb 14, 2011 at 03:06:27PM +0200, Kirill A. Shutsemov wrote:
> > > > From: Kirill A. Shutemov <kirill@shutemov.name>
> 
> <snip>
> 
> > > > +	list_for_each_entry(cur, &cgroup->children, sibling) {
> > > > +		child = cgroup_to_tslack_cgroup(cur);
> > > > +		if (type == TIMER_SLACK_MIN && val > child->min_slack_ns)
> > > > +			return -EBUSY;
> > > > +		if (type == TIMER_SLACK_MAX && val < child->max_slack_ns)
> > > > +			return -EBUSY;
> > > > +	}
> > > 
> > > This doesn't look right. Child cgroups should not constrain their
> > > parents. Instead you should allow the change and propagate the
> > > constraint to the children.
> > 
> > See discussion with Thomas.
> 
> <OK, shifting this topic to that thread>
> <snip>
> 
> > > > +static struct cftype files[] = {
> > > > +	{
> > > > +		.name = "set_slack_ns",
> > > > +		.write_u64 = tslack_write_set_slack_ns,
> > > > +	},
> > > > +	{
> > > > +		.name = "min_slack_ns",
> > > > +		.private = TIMER_SLACK_MIN,
> > > > +		.read_u64 = tslack_read_range,
> > > > +		.write_u64 = tslack_write_range,
> > > > +	},
> > > > +	{
> > > > +		.name = "max_slack_ns",
> > > > +		.private = TIMER_SLACK_MAX,
> > > > +		.read_u64 = tslack_read_range,
> > > > +		.write_u64 = tslack_write_range,
> > > > +	},
> > > 
> > > I didn't get a reply on how a max_slack_ns is useful. It seems
> > > prudent to add as little interface as possible and only when
> > > we clearly see the utility of it.
> > 
> > For example, you can create two groups (excluding root cgroup):
> > 
> > default - timer slack range 50000-50000
> > relaxed - timer slack range 500000-unlimited.
> > 
> > Now you can drag tasks between these group without need to reset value on
> > relaxed -> default transition.
> 
> Perhaps you misunderstood my point.
> 
> Yes, I can see that a maximum allows you to do counter-productive/pointless
> little tricks like "setting" the timer slack when you move the task. I
> just don't get the point of it. Why is setting a maximum timer slack useful?
> If anything it seems like it would be quite counterproductive or pointless
> *at best* because limiting the amount of timer slack would not improve
> the wakeup situation -- it could easily make it worse. Are there
> *any* negative consequences to allowing timer slacks as large as
> userspace requests -- perhaps even up to ULLONG_MAX? If there are none then
> why should we bother providing userspace a knob to set and enforce such a
> limit?

Could you describe the interface how you see it?

-- 
 Kirill A. Shutemov

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

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 13:06 [PATCH, v6 0/3] Introduce timer slack controller Kirill A. Shutsemov
2011-02-14 13:06 ` [PATCH, v6 1/3] cgroups: export cgroup_iter_{start,next,end} Kirill A. Shutsemov
2011-02-14 13:27   ` Thomas Gleixner
     [not found]     ` <alpine.LFD.2.00.1102141421500.26192-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org>
2011-02-14 14:39       ` Kirill A. Shutemov
     [not found]         ` <20110214143902.GA3666-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-02-14 15:09           ` Thomas Gleixner
     [not found] ` <1297688787-3592-1-git-send-email-kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-02-14 13:06   ` [PATCH, v6 2/3] Implement timer slack notifier chain Kirill A. Shutsemov
     [not found]     ` <1297688787-3592-3-git-send-email-kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-02-14 13:32       ` Thomas Gleixner
     [not found]         ` <alpine.LFD.2.00.1102141428080.26192-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org>
2011-02-14 14:52           ` Kirill A. Shutemov
     [not found]             ` <20110214145244.GB3666-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-02-14 15:16               ` Thomas Gleixner
2011-02-14 13:26   ` [PATCH, v6 0/3] Introduce timer slack controller Thomas Gleixner
2011-02-14 13:06 ` [PATCH, v6 3/3] cgroups: introduce " Kirill A. Shutsemov
     [not found]   ` <1297688787-3592-4-git-send-email-kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-02-14 13:59     ` Matt Helsley
     [not found]       ` <20110214135926.GO16432-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2011-02-14 22:59         ` Kirill A. Shutemov
     [not found]           ` <20110214225940.GB6230-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-02-15  0:00             ` Matt Helsley
2011-02-15  0:10               ` Kirill A. Shutemov [this message]
2011-02-14 14:00   ` Thomas Gleixner
     [not found]     ` <alpine.LFD.2.00.1102141432440.26192-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org>
2011-02-14 15:19       ` Kirill A. Shutemov
     [not found]         ` <20110214151914.GA4210-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-02-14 17:01           ` Thomas Gleixner
     [not found]             ` <alpine.LFD.2.00.1102141753240.26192-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org>
2011-02-14 22:39               ` Kirill A. Shutemov
     [not found]                 ` <20110214223939.GA6230-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-02-14 23:39                   ` Matt Helsley
2011-02-15  6:04                   ` Thomas Gleixner

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=20110215001004.GA6644@shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=matthltc@us.ibm.com \
    --cc=menage@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).