public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] change cpuacct usage percpu format
@ 2009-02-27  5:05 KAMEZAWA Hiroyuki
  2009-02-27  6:39 ` Balbir Singh
  2009-02-27  7:29 ` [PATCH] change cpuacct usage percpu format v2 KAMEZAWA Hiroyuki
  0 siblings, 2 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-02-27  5:05 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org
  Cc: kenchen, menage@google.com, lizf@cn.fujitsu.com,
	balbir@linux.vnet.ibm.com, mingo, akpm@linux-foundation.org

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;


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

end of thread, other threads:[~2009-02-28  9:37 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27  5:05 [PATCH] change cpuacct usage percpu format KAMEZAWA Hiroyuki
2009-02-27  6:39 ` Balbir Singh
2009-02-27  6:55   ` KAMEZAWA Hiroyuki
2009-02-27  7:01     ` Balbir Singh
2009-02-27  7:03       ` Li Zefan
2009-02-27  7:05         ` KAMEZAWA Hiroyuki
2009-02-27  7:29 ` [PATCH] change cpuacct usage percpu format v2 KAMEZAWA Hiroyuki
2009-02-27  7:55   ` Paul Menage
2009-02-27  8:02     ` KAMEZAWA Hiroyuki
2009-02-27 20:13   ` Ken Chen
2009-02-27 23:34     ` KAMEZAWA Hiroyuki
2009-02-28  0:00       ` Ken Chen
2009-02-28  0:14         ` KAMEZAWA Hiroyuki
2009-02-28  0:42           ` KAMEZAWA Hiroyuki
2009-02-28  1:11             ` Dhaval Giani
2009-02-28  5:25               ` KAMEZAWA Hiroyuki
2009-02-28  9:24                 ` Dhaval Giani
2009-02-28  9:37                   ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox