Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-29 Thread Peter Zijlstra
On Tue, Aug 29, 2017 at 08:24:27AM -0700, Tejun Heo wrote: > Hello, Peter. > > On Tue, Aug 29, 2017 at 04:32:52PM +0200, Peter Zijlstra wrote: > > So I mostly like. On accounting it only adds to the immediate cgroup (if > > it has a parent, aka !root). > > > > On update it does a DFS of all sub-g

Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-29 Thread Tejun Heo
Hello, Waiman. On Tue, Aug 29, 2017 at 11:32:35AM -0400, Waiman Long wrote: > > Also, please note that a system may end up with a lot of cgroups > > without the user intending to. memcg drains removed cgroups lazily > > and the number of draining cgroups can reach very high numbers if the > > sys

Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-29 Thread Waiman Long
On 08/29/2017 11:24 AM, Tejun Heo wrote: > Hello, Peter. > > On Tue, Aug 29, 2017 at 04:32:52PM +0200, Peter Zijlstra wrote: >> So I mostly like. On accounting it only adds to the immediate cgroup (if >> it has a parent, aka !root). >> >> On update it does a DFS of all sub-groups and propagates the

Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-29 Thread Tejun Heo
Hello, Peter. On Tue, Aug 29, 2017 at 04:32:52PM +0200, Peter Zijlstra wrote: > So I mostly like. On accounting it only adds to the immediate cgroup (if > it has a parent, aka !root). > > On update it does a DFS of all sub-groups and propagates the deltas up > to the requested group. ... > What I

Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-29 Thread Peter Zijlstra
So I mostly like. On accounting it only adds to the immediate cgroup (if it has a parent, aka !root). On update it does a DFS of all sub-groups and propagates the deltas up to the requested group. On Fri, Aug 11, 2017 at 09:37:54AM -0700, Tejun Heo wrote: > +/** > + * cgroup_cpu_stat_updated - k

Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-17 Thread Tejun Heo
Hello, On Thu, Aug 17, 2017 at 01:07:41PM +0100, Roman Gushchin wrote: > On Fri, Aug 11, 2017 at 09:37:54AM -0700, Tejun Heo wrote: > > In cgroup1, while cpuacct isn't actually controlling any resources, it > > is a separate controller due to combinaton of two factors - > > s/combinaton/combinati

Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-17 Thread Roman Gushchin
Hi Tejun! On Fri, Aug 11, 2017 at 09:37:54AM -0700, Tejun Heo wrote: > In cgroup1, while cpuacct isn't actually controlling any resources, it > is a separate controller due to combinaton of two factors - s/combinaton/combination > @@ -4466,6 +4470,8 @@ static void css_free_work_fn(struct work_st

Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-13 Thread Waiman Long
On 08/13/2017 03:44 PM, Tejun Heo wrote: > Hello, Waiman. > > On Fri, Aug 11, 2017 at 04:19:07PM -0400, Waiman Long wrote: >>> * CPU usage stats are collected and shown in "cgroup.stat" with "cpu." >>> prefix. Total usage is collected from scheduling events. User/sys >>> breakdown is sourced

Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-13 Thread Tejun Heo
Hello, Waiman. On Fri, Aug 11, 2017 at 04:19:07PM -0400, Waiman Long wrote: > > * CPU usage stats are collected and shown in "cgroup.stat" with "cpu." > > prefix. Total usage is collected from scheduling events. User/sys > > breakdown is sourced from tick sampling and adjusted to the usage >

Re: [PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-11 Thread Waiman Long
On 08/11/2017 12:37 PM, Tejun Heo wrote: > In cgroup1, while cpuacct isn't actually controlling any resources, it > is a separate controller due to combinaton of two factors - > 1. enabling cpu controller has significant side effects, and 2. we > have to pick one of the hierarchies to account CPU u

[PATCH 3/3] cgroup: Implement cgroup2 basic CPU usage accounting

2017-08-11 Thread Tejun Heo
In cgroup1, while cpuacct isn't actually controlling any resources, it is a separate controller due to combinaton of two factors - 1. enabling cpu controller has significant side effects, and 2. we have to pick one of the hierarchies to account CPU usages on. cpuacct controller is effectively used