From: Tejun Heo <tj@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: lizefan@huawei.com, hannes@cmpxchg.org, mingo@redhat.com,
longman@redhat.com, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-team@fb.com, pjt@google.com,
luto@amacapital.net, efault@gmx.de,
torvalds@linux-foundation.org, guro@fb.com
Subject: Re: [PATCH 2/2] sched: Implement interface for cgroup unified hierarchy
Date: Tue, 1 Aug 2017 13:17:45 -0700 [thread overview]
Message-ID: <20170801201745.GA2311718@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <20170729091707.lobbicnw253wzltu@hirez.programming.kicks-ass.net>
Hello, Peter.
On Sat, Jul 29, 2017 at 11:17:07AM +0200, Peter Zijlstra wrote:
> > * "cpu.shares" is replaced with "cpu.weight" and operates on the
> > standard scale defined by CGROUP_WEIGHT_MIN/DFL/MAX (1, 100, 10000).
> > The weight is scaled to scheduler weight so that 100 maps to 1024
> > and the ratio relationship is preserved - if weight is W and its
> > scaled value is S, W / 100 == S / 1024. While the mapped range is a
> > bit smaller than the orignal scheduler weight range, the dead zones
> > on both sides are relatively small and covers wider range than the
> > nice value mappings. This file doesn't make sense in the root
> > cgroup and isn't create on root.
>
> s/create/&d/
Updated, thanks.
> > * "cpu.rt_runtime_us" and "cpu.rt_period_us" are replaced by
> > "cpu.rt.max" which contains both runtime and period.
>
> So we've been looking at overhauling the whole RT stuff. But sadly we've
> not been able to find something that works with all the legacy
> constraints (like RT tasks having arbitrary affinities).
>
> Lets just hope we can preserve this interface :/
Ah, should have dropped this from the description. Yeah, we can wait
till the RT side settles down and go for a better matching interface
as necessary.
> > v3: - Added "cpu.weight.nice" to allow using nice values when
> > configuring the weight. The feature is requested by PeterZ.
> > - Merge the patch to enable threaded support on cpu and cpuacct.
>
> > - Dropped the bits about getting rid of cpuacct from patch
> > description as there is a pretty strong case for making cpuacct
> > an implicit controller so that basic cpu usage stats are always
> > available.
>
> What about the whole double accounting thing? Because currently cpuacct
> and cpu do a fair bit of duplication. It would be very good to get rid
> of that.
I'm not that sure at this point. Here are my current thoughts on
cpuacct.
* It is useful to have basic cpu statistics on cgroup without having
to enable the cpu controller, especially because enabling cpu
controller always changes how cpu cycles are distributed and
currently comes at some performance overhead.
* On cgroup2, there is only one hierarchy. It'd be great to have
basic resource accounting enabled by default on all cgroups. Note
that we couldn't do that on v1 because there could be any number of
hierarchies and the cost would increase with the number of
hierarchies.
* It is bothersome that we're walking up the tree each time for
cpuacct although being percpu && just walking up the tree makes it
relatively cheap. Anyways, I'm thinking about shifting the
aggregation to the reader side so that the hot path always only
updates local counters in a way which can scale even when there are
a lot of (idle) cgroups. Will follow up on this later.
Thanks.
--
tejun
next prev parent reply other threads:[~2017-08-01 20:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 18:48 [PATCHSET for-4.14] cgroup, sched: cgroup2 interface for CPU controller Tejun Heo
2017-07-20 18:48 ` Tejun Heo
2017-07-20 18:48 ` [PATCH 1/2] sched: Misc preps for cgroup unified hierarchy interface Tejun Heo
2017-07-20 18:48 ` [PATCH 2/2] sched: Implement interface for cgroup unified hierarchy Tejun Heo
[not found] ` <20170720184808.1433868-3-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-07-29 9:17 ` Peter Zijlstra
2017-07-29 9:17 ` Peter Zijlstra
2017-08-01 20:17 ` Tejun Heo [this message]
[not found] ` <20170801201745.GA2311718-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-08-01 21:40 ` Peter Zijlstra
2017-08-01 21:40 ` Peter Zijlstra
[not found] ` <20170801214038.sp4lw6lrnl3votte-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2017-08-02 15:41 ` Tejun Heo
2017-08-02 15:41 ` Tejun Heo
2017-08-02 16:05 ` Peter Zijlstra
2017-08-02 18:16 ` Tejun Heo
[not found] ` <20170720184808.1433868-1-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-07-27 19:51 ` [PATCHSET for-4.14] cgroup, sched: cgroup2 interface for CPU controller Tejun Heo
2017-07-27 19:51 ` Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2017-09-25 16:00 [PATCHSET REPOST for-4.15] cgroup, sched: cgroup2 interface for CPU controller (on basic acct) Tejun Heo
2017-09-25 16:00 ` [PATCH 2/2] sched: Implement interface for cgroup unified hierarchy Tejun Heo
2017-08-11 16:47 [PATCHSET for-4.14] cgroup, sched: cgroup2 interface for CPU controller (on basic acct) Tejun Heo
2017-08-11 16:47 ` [PATCH 2/2] sched: Implement interface for cgroup unified hierarchy Tejun Heo
2016-08-05 17:07 [Documentation] State of CPU controller in cgroup v2 Tejun Heo
2016-08-05 17:09 ` [PATCH 2/2] sched: Implement interface for cgroup unified hierarchy Tejun Heo
2016-08-05 17:09 ` Tejun Heo
2016-01-05 16:47 [PATCHSET REPOST] sched, cgroup: implement cgroup v2 interface for cpu controller Tejun Heo
2016-01-05 16:48 ` [PATCH 2/2] sched: Implement interface for cgroup unified hierarchy Tejun Heo
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=20170801201745.GA2311718@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=efault@gmx.de \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=longman@redhat.com \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=torvalds@linux-foundation.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.