mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, Balaji Rao <balajirrao@gmail.com>,
	Dhaval Giani <dhaval@linux.vnet.ibm.com>,
	Li Zefan <lizf@cn.fujitsu.com>, Paul Menage <menage@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [PATCH -tip] cpuacct: per-cgroup utime/stime statistics - v6
Date: Mon, 30 Mar 2009 14:50:02 +0530	[thread overview]
Message-ID: <20090330092002.GB16497@balbir.in.ibm.com> (raw)
In-Reply-To: <20090325043950.GA3276@in.ibm.com>

* Bharata B Rao <bharata@linux.vnet.ibm.com> [2009-03-25 10:09:50]:

> Here is the next version which fixes the bug pointed by Li Zefan in v5.
> 
> We currently have two stats named stime and utime. In future if we
> decide to have more fine grained stats like time spent in irq, softirq
> etc, it will be difficult to name them similar to stime and utime. Hence
> would it make sense to name these stats as system and user so that we
> could easily add nice, irq, steal, softirq etc in future ?
> 
> Regards,
> Bharata.
> 
> cpuacct: Add stime and utime statistics
> 
> Add per-cgroup cpuacct controller statistics like the system and user
> time consumed by the group of tasks.
> 
> Changelog:
> 
> v6
> - Fixed a bug in the error path of cpuacct_create() (pointed by Li Zefan).
> 
> v5
> - In cpuacct_stats_show(), use cputime64_to_clock_t() since we are
>   operating on a 64bit variable here.
> 
> v4
> - Remove comments in cpuacct_update_stats() which explained why rcu_read_lock()
>   was needed (as per Peter Zijlstra's review comments).
> - Don't say that percpu_counter_read() is broken in Documentation/cpuacct.txt
>   as per KAMEZAWA Hiroyuki's review comments.
> 
> v3
> - Fix a small race in the cpuacct hierarchy walk.
> 
> v2
> - stime and utime now exported in clock_t units instead of msecs.
> - Addressed the code review comments from Balbir and Li Zefan.
> - Moved to -tip tree.
> 
> v1
> - Moved the stime/utime accounting to cpuacct controller.
> 
> Earlier versions
> - http://lkml.org/lkml/2009/2/25/129
> 
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> Signed-off-by: Balaji Rao <balajirrao@gmail.com>
> Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
> Cc: Paul Menage <menage@google.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
> Tested-by: Balbir Singh <balbir@linux.vnet.ibm.com>
> ---
>  Documentation/cgroups/cpuacct.txt |   18 +++++++
>  kernel/sched.c                    |   87 +++++++++++++++++++++++++++++++++++---
>  2 files changed, 99 insertions(+), 6 deletions(-)
> 
> --- a/Documentation/cgroups/cpuacct.txt
> +++ b/Documentation/cgroups/cpuacct.txt
> @@ -30,3 +30,21 @@ The above steps create a new group g1 an
>  process (bash) into it. CPU time consumed by this bash and its children
>  can be obtained from g1/cpuacct.usage and the same is accumulated in
>  /cgroups/cpuacct.usage also.
> +
> +cpuacct.stat file lists a few statistics which further divide the
> +CPU time obtained by the cgroup into user and system times. Currently
> +the following statistics are supported:
> +
> +utime: Time spent by tasks of the cgroup in user mode.
> +stime: Time spent by tasks of the cgroup in kernel mode.
> +

Bharata can we move away from stime, utime (names) to system and user with
time being an implicit unit. I would like to see softirq, hardirq, etc
times in the future being added.

-- 
	Balbir

  reply	other threads:[~2009-03-30  9:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25  4:39 Bharata B Rao
2009-03-30  9:20 ` Balbir Singh [this message]
2009-03-31  4:33   ` 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=20090330092002.GB16497@balbir.in.ibm.com \
    --to=balbir@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=balajirrao@gmail.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=dhaval@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    /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

all inboxes | Powered by JetHome®