From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Paul Turner <pjt@google.com>
Cc: linux-kernel@vger.kernel.org, Paul Menage <menage@google.com>,
Srivatsa Vaddagiri <vatsa@in.ibm.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Gautham R Shenoy <ego@in.ibm.com>,
Dhaval Giani <dhaval.giani@gmail.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Herbert Poetzl <herbert@13thfloor.at>,
Chris Friesen <cfriesen@nortel.com>, Avi Kivity <avi@redhat.com>,
Nikhil Rao <ncrao@google.com>, Ingo Molnar <mingo@elte.hu>,
Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
Mike Waychison <mikew@google.com>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
Pavel Emelyanov <xemul@openvz.org>
Subject: Re: [RFC PATCH v1 0/4] CFS Bandwidth Control
Date: Tue, 16 Feb 2010 11:09:46 +0530 [thread overview]
Message-ID: <20100216053946.GA3492@in.ibm.com> (raw)
In-Reply-To: <20100213025417.23325.90048.stgit@kitami.corp.google.com>
On Fri, Feb 12, 2010 at 06:54:52PM -0800, Paul Turner wrote:
>
> The skeleton of our approach is as follows:
> - As above we maintain a global pool, per-tg, pool of unassigned quota. On it
> we track the bandwidth period, quota per period, and runtime remaining in
> the current period. As bandwidth is used within a period it is decremented
> from runtime. Runtime is currently synchronized using a spinlock, in the
> current implementation there's no reason this couldn't be done using
> atomic ops instead however the spinlock allows for a little more flexibility
> in experimentation with other schemes.
> - When a cfs_rq participating in a bandwidth constrained task_group executes
> it acquires time in sysctl_sched_cfs_bandwidth_slice (default currently
> 10ms) size chunks from the global pool, this synchronizes under rq->lock and
> is part of the update_curr path.
> - Throttled entities are dequeued immediately (as opposed to delaying this
> operation to the put path), this avoids some potentially poor load-balancer
> interactions and preserves the 'verbage' of the put_task semantic.
> Throttled entities are gated from participating in the tree at the
> {enqueue, dequeue}_entity level. They are also skipped for load
> balance in the same manner as Bharatta's patch-series employs.
I did defer the dequeue until next put because walking the se hierarchy
multiple times (from update_curr -> dequeue_entity -> update_curr) appeared
too complex when I started with it.
>
> Interface:
> ----------
> Two new cgroupfs files are added to the cpu subsystem:
> - cpu.cfs_period_us : period over which bandwidth is to be regulated
> - cpu.cfs_quota_us : bandwidth available for consumption per period
>
> One important interface change that this introduces (versus the rate limits
> proposal) is that the defined bandwidth becomes an absolute quantifier.
>
> e.g. a bandwidth of 5 seconds (cpu.cfs_quota_us=5000000) on a period of 1 second
> (cpu.cfs_period_us=1000000) would result in 5 wall seconds of cpu time being
> consumable every 1 wall second.
As I have said earlier, I would like to hear what others say about this
interface. Especially from Linux-vserver project since it is already
using the cfs hard limit patches in their test release. Herbert ?
Thanks for your work. More later when I review the individual patches
in detail.
Regards,
Bharata.
next prev parent reply other threads:[~2010-02-16 5:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-13 2:54 [RFC PATCH v1 0/4] CFS Bandwidth Control Paul Turner
2010-02-13 2:54 ` [RFC PATCH v1 1/4] sched: introduce primitives to account for CFS bandwidth tracking Paul
2010-02-25 8:14 ` Bharata B Rao
2010-02-25 10:30 ` Paul Turner
2010-02-26 11:52 ` Bharata B Rao
2010-02-13 2:55 ` [RFC PATCH v1 2/4] sched: accumulate per-cfs_rq cpu usage Paul
2010-02-13 2:55 ` [RFC PATCH v1 3/4] sched: throttle cfs_rq entities which exceed their local quota Paul
2010-02-13 2:55 ` [RFC PATCH v1 4/4] sched: unthrottle cfs_rq(s) who ran out of quota at period refresh Paul
2010-02-16 5:39 ` Bharata B Rao [this message]
2010-02-16 6:18 ` [RFC PATCH v1 0/4] CFS Bandwidth Control Bharata B Rao
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=20100216053946.GA3492@in.ibm.com \
--to=bharata@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=avi@redhat.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=cfriesen@nortel.com \
--cc=dhaval.giani@gmail.com \
--cc=ego@in.ibm.com \
--cc=herbert@13thfloor.at \
--cc=kamalesh@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=mikew@google.com \
--cc=mingo@elte.hu \
--cc=ncrao@google.com \
--cc=pjt@google.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=vatsa@in.ibm.com \
--cc=xemul@openvz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox