Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1346522 > unrolled thread
| Started by | Zhao Lei <zhaolei@cn.fujitsu.com> |
|---|---|
| First post | 2016-03-01 11:40 +0100 |
| Last post | 2016-03-02 17:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
RE: [RESEND PATCH 2/2] cpuacct: split usage into user_usage and sys_usage. Zhao Lei <zhaolei@cn.fujitsu.com> - 2016-03-01 11:40 +0100
Re: [RESEND PATCH 2/2] cpuacct: split usage into user_usage and sys_usage. 'Tejun Heo' <tj@kernel.org> - 2016-03-02 17:20 +0100
| From | Zhao Lei <zhaolei@cn.fujitsu.com> |
|---|---|
| Date | 2016-03-01 11:40 +0100 |
| Subject | RE: [RESEND PATCH 2/2] cpuacct: split usage into user_usage and sys_usage. |
| Message-ID | <r7PSF-7T6-1@gated-at.bofh.it> |
Hi, Tejun Heo
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Tejun Heo
> Sent: Tuesday, December 22, 2015 5:33 AM
> To: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
> Cc: cgroups@vger.kernel.org; linux-kernel@vger.kernel.org;
> mingo@redhat.com; peterz@infradead.org
> Subject: Re: [RESEND PATCH 2/2] cpuacct: split usage into user_usage and
> sys_usage.
>
> On Mon, Dec 21, 2015 at 07:14:43PM +0800, Dongsheng Yang wrote:
> > Sometimes, cpuacct.usage is not detialed enough to user
> > to see how much usage a group used. We want to know how
> > much time it used in user mode and how much in kernel mode.
>
Yang gave this patch to me :)
I'm plan to continue this function.
> cpuusage is being phased out. If you need these stats, please
> implement it on cpu side.
>
Currently, old stats are put in cpuacct, if we put new stats into cpu side,
we have following way:
1: Only put new stats into cpu side, and don't change old interface,
we'll see following content in cgroup dir:
/cgroup/cpuacct:
cpuacct.usage
cpuacct.usage_percpu
/cgroup/cpu:
cpu.usage_sys
cpu.usage_percpu_sys
cpu.usage_user
cpu.usage_percpu_user
It is obviously not unify.
2: Move old stats into cpu side, and add new stats:
we'll see following content in cgroup dir:
/cgroup/cpuacct:
[NONE]
/cgroup/cpu:
cpu.usage
cpu.usage_percpu
cpu.usage_sys
cpu.usage_percpu_sys
cpu.usage_user
cpu.usage_percpu_user
It have compatibility issues with old system.
3: Clone old stats into cpu side(share one copy of code), and add new stats
Into cpu side, we'll see following content in cgroup dir:
/cgroup/cpuacct:
cpuacct.usage
cpuacct.usage_percpu
/cgroup/cpu:
cpu.usage
cpu.usage_percpu
cpu.usage_sys
cpu.usage_percpu_sys
cpu.usage_user
cpu.usage_percpu_user
It can support both old and new systems, and we can remove old interface
in future, but we if mount both cpu and cpuacct into same dir,
we'll see following duplicated files:
/cgroup/cpu,cpuacct
cpu.usage
cpuacct.usage
cpu.usage_percpu
cpuacct.usage_percpu
...
Maybe above way3 looks having less defect, cound you talk about
your opinion on it.
Thanks
Zhaolei
[toc] | [next] | [standalone]
| From | 'Tejun Heo' <tj@kernel.org> |
|---|---|
| Date | 2016-03-02 17:20 +0100 |
| Subject | Re: [RESEND PATCH 2/2] cpuacct: split usage into user_usage and sys_usage. |
| Message-ID | <r8hFh-1CS-33@gated-at.bofh.it> |
| In reply to | #1346522 |
Hello, On Tue, Mar 01, 2016 at 06:35:56PM +0800, Zhao Lei wrote: > Hi, Tejun Heo > > > From: linux-kernel-owner@vger.kernel.org > > [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Tejun Heo > > Sent: Tuesday, December 22, 2015 5:33 AM > > To: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> > > Cc: cgroups@vger.kernel.org; linux-kernel@vger.kernel.org; > > mingo@redhat.com; peterz@infradead.org > > Subject: Re: [RESEND PATCH 2/2] cpuacct: split usage into user_usage and > > sys_usage. > > > > On Mon, Dec 21, 2015 at 07:14:43PM +0800, Dongsheng Yang wrote: > > > Sometimes, cpuacct.usage is not detialed enough to user > > > to see how much usage a group used. We want to know how > > > much time it used in user mode and how much in kernel mode. > > > Yang gave this patch to me :) > I'm plan to continue this function. > > > cpuusage is being phased out. If you need these stats, please > > implement it on cpu side. > > Currently, old stats are put in cpuacct, if we put new stats into cpu side, > we have following way: Yeah, on the second thought, at least for now, I think it's best to put this in cpuacct. We can do the trafer to the cpu controller later. Please feel free to add Acked-by: Tejun Heo <tj@kernel.org> Thanks. -- tejun
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web