All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] cpuacct: Show all detail stats in one file
@ 2016-05-10 17:43 Zhao Lei
  2016-05-10 17:43 ` [PATCH 1/3] cpuacct: Merge cpuacct_usage_index and cpuacct_usage_index Zhao Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Zhao Lei @ 2016-05-10 17:43 UTC (permalink / raw)
  To: linux-kernel, Peter Zijlstra; +Cc: Zhao Lei

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

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.

This patchset should be applied on top of:
sched/cpuacct: Check for NULL when using task_pt_regs()
in tip tree.
Commit-ID:  bd92883051a0228cc34996b8e766111ba10c9aac
Gitweb:     http://git.kernel.org/tip/bd92883051a0228cc34996b8e766111ba10c9aac
Author:     Anton Blanchard <anton@samba.org>
AuthorDate: Wed, 6 Apr 2016 21:59:50 +1000
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 13 Apr 2016 13:22:37 +0200

Zhao Lei (3):
  cpuacct: Merge cpuacct_usage_index and cpuacct_usage_index
  cpuacct: Simplify cpuacct_stats_show
  cpuacct: Show all detail stats in one file

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

-- 
1.8.5.1

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

end of thread, other threads:[~2016-05-12  7:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-10 17:43 [PATCH 0/3] cpuacct: Show all detail stats in one file Zhao Lei
2016-05-10 17:43 ` [PATCH 1/3] cpuacct: Merge cpuacct_usage_index and cpuacct_usage_index Zhao Lei
2016-05-12  7:49   ` Ingo Molnar
2016-05-10 17:43 ` [PATCH 2/3] cpuacct: Simplify cpuacct_stats_show Zhao Lei
2016-05-12  7:47   ` Ingo Molnar
2016-05-10 17:43 ` [PATCH 3/3] cpuacct: Show all detail stats in one file Zhao Lei
2016-05-11 11:39   ` Peter Zijlstra

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.