]> asedeno.scripts.mit.edu Git - linux.git/commit
sched/cpuacct: Use loop to consolidate code in cpuacct_stats_show()
authorZhao Lei <zhaolei@cn.fujitsu.com>
Mon, 20 Jun 2016 09:37:19 +0000 (17:37 +0800)
committerIngo Molnar <mingo@kernel.org>
Sat, 9 Jul 2016 11:56:15 +0000 (13:56 +0200)
commit8e546bfafb3121ed25c73a0c02311ec58459344a
tree9f141218a3f5d40170e280cc1d5669fc08e47324
parent9acacc2ac525ef1397af63b15cef7bb77a823c06
sched/cpuacct: Use loop to consolidate code in cpuacct_stats_show()

In cpuacct_stats_show() we currently we have copies of similar code,
for each cpustat(system/user) variant.

Use a loop instead to consolidate the code. This will also work better
if we extend the CPUACCT_STAT_NSTATS type.

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/b0597d4224655e9f333f1a6224ed9654c7d7d36a.1466415271.git.zhaolei@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/cpuacct.c