sched/cpuacct: Introduce cpuacct.usage_all to show all CPU stats together
authorZhao Lei <zhaolei@cn.fujitsu.com>
Mon, 20 Jun 2016 09:37:20 +0000 (17:37 +0800)
committerIngo Molnar <mingo@kernel.org>
Sat, 9 Jul 2016 11:56:15 +0000 (13:56 +0200)
commit277a13e4f0d661678a7084bf97ed96a99c7dac21
tree95235ad9dcfa402e6fb363cebbd7b83737434253
parent8e546bfafb3121ed25c73a0c02311ec58459344a
sched/cpuacct: Introduce cpuacct.usage_all to show all CPU stats together

In current code, we can get cpuacct data from several files,
but each file has various limitations.

For example:

 - We can get CPU usage in user and kernel mode via cpuacct.stat,
   but we can't get detailed data about each CPU.

 - We can get each CPU's kernel mode usage in cpuacct.usage_percpu_sys,
   but we can't get user mode usage data at the same time.

This patch introduces cpuacct.usage_all, to show all detailed CPU
accounting data together:

 # cat cpuacct.usage_all
 cpu user system
 0 3809760299 5807968992
 1 3250329855 454612211
 ..

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/7744460969edd7caaf0e903592ee52353ed9bdd6.1466415271.git.zhaolei@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/cpuacct.c
This page took 0.025762 seconds and 5 git commands to generate.