lkml.org 
[lkml]   [2009]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] change cpuacct usage percpu format
I'd like to change cpuacct.usage_percpu format before it's widely used.
Current format is not easy to use in hardware with DR feature.

==
cpuacct.usage_percpu shows per cpu usage information via cgroupfs.
It shows all present cpus information and "whose information ?"
is explained just by index of data implicitly.

IIRC, there is physical cpu hotplug and it can remove
cpus and change present map. Considering a software which records
this information pediodically(like sar.), its better to show id of cpu
in explict way.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
kernel/sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mmotm-2.6.29-Feb24/kernel/sched.c
===================================================================
--- mmotm-2.6.29-Feb24.orig/kernel/sched.c
+++ mmotm-2.6.29-Feb24/kernel/sched.c
@@ -9719,7 +9719,7 @@ static int cpuacct_percpu_seq_read(struc

for_each_present_cpu(i) {
percpu = cpuacct_cpuusage_read(ca, i);
- seq_printf(m, "%llu ", (unsigned long long) percpu);
+ seq_printf(m, "%d %llu\n", i, (unsigned long long) percpu);
}
seq_printf(m, "\n");
return 0;


\
 
 \ /
  Last update: 2009-02-27 06:09    [W:0.891 / U:0.264 seconds]
©2003-2014 Jasper Spaans. Advertise on this site