linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] cpuacct: Introduce cpuacct.usage_all to show all cpu stats together(was: [PATCH v2 0/3] cpuacct: Show all detail stats in one file)
@ 2016-05-17 10:01 Zhao Lei
  2016-05-17 10:01 ` [PATCH v3 1/3] cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index Zhao Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zhao Lei @ 2016-05-17 10:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Peter Zijlstra, Ingo Molnar, KOSAKI Motohiro, Zhao Lei

In current code, we can get cpuacct data from several files,
but each file have its limit.

For example:
we can get cpu usage in user and kernel mode by cpuacct.stat,
but we can't get detail data of each cpu in above file.
we can get each cpu's kernel mode usage in cpuacct.usage_percpu_sys,
but we can't get user mode data in the same time.

This patch introduce cpuacct.usage_all, to show all detailed
cpu accounting data altogether:
 # cat cpuacct.usage_all
 cpu user system
 0 3809760299 5807968992
 1 3250329855 454612211
 ..

Any aspects of statistics data can be get from this file
with a simple data-processing code.

To: Ingo
> >  1: Rewrite subject and changelog to fix typos and
> >     make it more accurate.
> 
> So this is really annoying. In the previous review I suggested this:
> 
>  " - please fix the title of the patch: have a look at 'git log
>      kernel/sched/cpuacct.c' how recent titles to that code look like. "
> 
> If you do what I suggested, you see this title:
> 
>     sched/cpuacct: Check for NULL when using task_pt_regs()
> 
> Yet you continued to submit using the tag I complained about:
> 
>     cpuacct: Show all detail stats in one file
>
Sorry for the misunderstanding, I get above suggestion from thread
of [PATCH 2/3], and thought you suggest me to fix title of [PATCH 2/3],
and changed only title of [PATCH 2/3] from:
[PATCH 2/3] cpuacct: Simplify cpuacct_stats_show
to
[PATCH v2 2/3] cpuacct: Use loop to avoid copies of the similar code in cpuacct_stats_show()
in v2...

Changelog v2->v3:
 1: Change title of PATCH 3/3 from:
    cpuacct: Show all detail stats in one file
    to
    cpuacct: Introduce cpuacct.usage_all to show all cpu stats together
 2: Fix spelling typos in patch's description.
 Suggested by: Ingo Molnar <mingo.kernel.org@gmail.com>

Changelog v1->v2:
 1: Rewrite subject in PATCH 1/3 and 2/3 to fix typos and
    make it more accurate.
 2: Use a variable for the cpustat array itself to make
    code clean(avoid lot of 'kcpustat->').
 3: Add missed newline between variable definitions and
    the first non-definition C statement.
 Above are suggested by: Ingo Molnar <mingo.kernel.org@gmail.com>
 4: Remove '[]' in CPUID, to make it easier to parse.
 Suggested by: Peter Zijlstra <peterz@infradead.org>

Zhao Lei (3):
  cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index
  cpuacct: Use loop to avoid copies of the similar code in
    cpuacct_stats_show()
  cpuacct: Introduce cpuacct.usage_all to show all cpu stats together

 kernel/sched/cpuacct.c | 114 +++++++++++++++++++++++++++++++------------------
 1 file changed, 73 insertions(+), 41 deletions(-)

-- 
1.8.5.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-17 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-17 10:01 [PATCH v3 0/3] cpuacct: Introduce cpuacct.usage_all to show all cpu stats together(was: [PATCH v2 0/3] cpuacct: Show all detail stats in one file) Zhao Lei
2016-05-17 10:01 ` [PATCH v3 1/3] cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index Zhao Lei
2016-05-17 10:01 ` [PATCH v3 2/3] cpuacct: Use loop to avoid copies of the similar code in cpuacct_stats_show() Zhao Lei
2016-05-17 10:01 ` [PATCH v3 3/3] cpuacct: Introduce cpuacct.usage_all to show all cpu stats together Zhao Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).