From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org,
peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-team-b10kYP2dOMg@public.gmane.org,
pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org,
efault-Mmb7MZpHnFY@public.gmane.org,
torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
guro-b10kYP2dOMg@public.gmane.org
Subject: [PATCHSET for-4.14] cgroup, sched: cgroup2 basic resource accounting
Date: Fri, 11 Aug 2017 09:37:51 -0700 [thread overview]
Message-ID: <20170811163754.3939102-1-tj@kernel.org> (raw)
Hello,
This patchset implement cgroup2 basic resource accounting and track
CPU usages on all cgroups by default.
In cgroup1, collecting non-trivial statistics by default wasn't viable
because there can be any number of hierarchies. While cgroup2's
single hierarchy removes that part of the problem, propagating up the
hierarchy on each accounting event is still problematic.
This patchset implements cgroup2 basic resource accounting mechanism
which keeps all the counters per-cpu and propagates lazily to allow
the accounting side to only perform single per-cpu accounting in most
cases and the reader side's complexity to be O(nr updated descendants)
instead of O(nr total descendants).
This will be used by cgroup2 CPU interface later. The patchset
contains the following three patches.
0001-sched-cputime-Expose-cputime_adjust.patch
0002-cpuacct-Introduce-cgroup_account_cputime-_field.patch
0003-cgroup-Implement-cgroup2-basic-CPU-usage-accounting.patch
The patchset is on top of cgroup/for-4.14 and available in the
following git branch.
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup2-basic-acct
diffstat follows. Thanks.
Documentation/cgroup-v2.txt | 9 +
include/linux/cgroup-defs.h | 47 +++++
include/linux/cgroup.h | 60 +++++++
include/linux/sched/cputime.h | 3
kernel/cgroup/Makefile | 2
kernel/cgroup/cgroup-internal.h | 8
kernel/cgroup/cgroup.c | 24 ++
kernel/cgroup/stat.c | 333 ++++++++++++++++++++++++++++++++++++++++
kernel/sched/cpuacct.h | 17 --
kernel/sched/cputime.c | 7
kernel/sched/deadline.c | 2
kernel/sched/fair.c | 2
kernel/sched/rt.c | 2
kernel/sched/sched.h | 1
kernel/sched/stop_task.c | 2
15 files changed, 489 insertions(+), 30 deletions(-)
--
tejun
WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj@kernel.org>
To: lizefan@huawei.com, hannes@cmpxchg.org, peterz@infradead.org,
mingo@redhat.com, longman@redhat.com
Cc: 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: [PATCHSET for-4.14] cgroup, sched: cgroup2 basic resource accounting
Date: Fri, 11 Aug 2017 09:37:51 -0700 [thread overview]
Message-ID: <20170811163754.3939102-1-tj@kernel.org> (raw)
Hello,
This patchset implement cgroup2 basic resource accounting and track
CPU usages on all cgroups by default.
In cgroup1, collecting non-trivial statistics by default wasn't viable
because there can be any number of hierarchies. While cgroup2's
single hierarchy removes that part of the problem, propagating up the
hierarchy on each accounting event is still problematic.
This patchset implements cgroup2 basic resource accounting mechanism
which keeps all the counters per-cpu and propagates lazily to allow
the accounting side to only perform single per-cpu accounting in most
cases and the reader side's complexity to be O(nr updated descendants)
instead of O(nr total descendants).
This will be used by cgroup2 CPU interface later. The patchset
contains the following three patches.
0001-sched-cputime-Expose-cputime_adjust.patch
0002-cpuacct-Introduce-cgroup_account_cputime-_field.patch
0003-cgroup-Implement-cgroup2-basic-CPU-usage-accounting.patch
The patchset is on top of cgroup/for-4.14 and available in the
following git branch.
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup2-basic-acct
diffstat follows. Thanks.
Documentation/cgroup-v2.txt | 9 +
include/linux/cgroup-defs.h | 47 +++++
include/linux/cgroup.h | 60 +++++++
include/linux/sched/cputime.h | 3
kernel/cgroup/Makefile | 2
kernel/cgroup/cgroup-internal.h | 8
kernel/cgroup/cgroup.c | 24 ++
kernel/cgroup/stat.c | 333 ++++++++++++++++++++++++++++++++++++++++
kernel/sched/cpuacct.h | 17 --
kernel/sched/cputime.c | 7
kernel/sched/deadline.c | 2
kernel/sched/fair.c | 2
kernel/sched/rt.c | 2
kernel/sched/sched.h | 1
kernel/sched/stop_task.c | 2
15 files changed, 489 insertions(+), 30 deletions(-)
--
tejun
next reply other threads:[~2017-08-11 16:37 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-11 16:37 Tejun Heo [this message]
2017-08-11 16:37 ` [PATCHSET for-4.14] cgroup, sched: cgroup2 basic resource accounting Tejun Heo
2017-08-11 16:37 ` [PATCH 1/3] sched/cputime: Expose cputime_adjust() Tejun Heo
2017-08-11 16:37 ` [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting Tejun Heo
[not found] ` <20170811163754.3939102-4-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-11 20:19 ` Waiman Long
2017-08-11 20:19 ` Waiman Long
[not found] ` <e9682f27-a23c-802c-daed-e49fc9d4613c-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-08-13 19:44 ` Tejun Heo
2017-08-13 19:44 ` Tejun Heo
[not found] ` <20170813194421.GB1438922-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-08-13 23:20 ` Waiman Long
2017-08-13 23:20 ` Waiman Long
2017-08-29 14:32 ` Peter Zijlstra
2017-08-29 14:32 ` Peter Zijlstra
[not found] ` <20170829143252.6zoes63bwfflukjy-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2017-08-29 15:24 ` Tejun Heo
2017-08-29 15:24 ` Tejun Heo
[not found] ` <20170829152426.GL491396-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-08-29 15:32 ` Waiman Long
2017-08-29 15:32 ` Waiman Long
2017-08-29 15:42 ` Tejun Heo
2017-08-29 15:59 ` Peter Zijlstra
2017-08-29 15:59 ` Peter Zijlstra
2017-08-29 17:43 ` [PATCH v2 " Tejun Heo
2017-08-29 17:43 ` Tejun Heo
[not found] ` <20170829174325.GS491396-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-08-29 18:06 ` Waiman Long
2017-08-29 18:06 ` Waiman Long
2017-08-29 18:10 ` Tejun Heo
2017-08-17 12:07 ` [PATCH " Roman Gushchin
2017-08-17 12:07 ` Roman Gushchin
[not found] ` <20170817120741.GA22854-B3w7+ongkCiLfgCeKHXN1g2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-08-17 13:13 ` Tejun Heo
2017-08-17 13:13 ` Tejun Heo
2017-08-16 18:52 ` [PATCHSET for-4.14] cgroup, sched: cgroup2 basic resource accounting Tejun Heo
2017-08-17 8:13 ` Ingo Molnar
2017-08-17 13:01 ` Tejun Heo
[not found] ` <20170817130158.GB3238792-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-08-17 15:03 ` Ingo Molnar
2017-08-17 15:03 ` Ingo Molnar
[not found] ` <20170811163754.3939102-1-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-11 16:37 ` [PATCH 2/3] cpuacct: Introduce cgroup_account_cputime[_field]() Tejun Heo
2017-08-11 16:37 ` Tejun Heo
[not found] ` <20170811163754.3939102-3-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-11 17:28 ` [PATCH v2 " Tejun Heo
2017-08-11 17:28 ` Tejun Heo
2017-08-24 17:20 ` [PATCHSET for-4.14] cgroup, sched: cgroup2 basic resource accounting Tejun Heo
2017-08-24 17:20 ` Tejun Heo
2017-09-22 18:05 ` Tejun Heo
2017-09-22 18:05 ` Tejun Heo
[not found] ` <20170922180530.GG828415-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-09-23 13:37 ` Peter Zijlstra
2017-09-23 13:37 ` Peter Zijlstra
[not found] ` <20170923133731.uq5qekjypndpjv2l-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2017-09-23 13:44 ` Tejun Heo
2017-09-23 13:44 ` Tejun Heo
[not found] ` <20170923134402.GI828415-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-09-25 7:27 ` Peter Zijlstra
2017-09-25 7:27 ` Peter Zijlstra
[not found] ` <20170925072718.zajtw4fvubgqtp5r-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2017-09-25 15:07 ` Tejun Heo
2017-09-25 15:07 ` Tejun Heo
2017-09-25 21:10 ` [PATCH cgroup/for-4.15] cgroup: statically initialize init_css_set->dfl_cgrp Tejun Heo
2017-09-25 21:10 ` Tejun Heo
2017-09-25 21:34 ` [PATCH cgroup/for-4.15] sched/cputime: Add dummy cputime_adjust() implementation for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE Tejun Heo
2017-09-25 21:34 ` Tejun Heo
2017-09-26 9:10 ` Peter Zijlstra
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=20170811163754.3939102-1-tj@kernel.org \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=efault-Mmb7MZpHnFY@public.gmane.org \
--cc=guro-b10kYP2dOMg@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=kernel-team-b10kYP2dOMg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@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.