From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
kenchen@google.com, "menage@google.com" <menage@google.com>,
"lizf@cn.fujitsu.com" <lizf@cn.fujitsu.com>,
mingo@elte.hu,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [PATCH] change cpuacct usage percpu format
Date: Fri, 27 Feb 2009 12:31:48 +0530 [thread overview]
Message-ID: <20090227070148.GU11421@balbir.in.ibm.com> (raw)
In-Reply-To: <20090227155517.9283641b.kamezawa.hiroyu@jp.fujitsu.com>
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-02-27 15:55:17]:
> On Fri, 27 Feb 2009 12:09:55 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
> > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-02-27 14:05:37]:
> >
> > > 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);
> >
> > Seems like a reasonable change, but I wonder if " " should the
> > separator between the CPU and data, I wounder if we should use
> > cpu:usage_per_cpu.
>
> Ah, no strong reason for " ".
>
> Hmm, like this ?
> ==
> seq_printf(m, "%d: %llu\n", i, (unsigned long long) percpu);
> or
> seq_printf(m, "%d\t: %llu\n", i, (unsigned long long) percpu);
> ==
>
>
I'd like to see : and not space after it so something like
seq_printf(m, "%d:%llu\n", i, (unsigned long long) percpu);
--
Balbir
next prev parent reply other threads:[~2009-02-27 7:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-27 5:05 KAMEZAWA Hiroyuki
2009-02-27 6:39 ` Balbir Singh
2009-02-27 6:55 ` KAMEZAWA Hiroyuki
2009-02-27 7:01 ` Balbir Singh [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090227070148.GU11421@balbir.in.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kenchen@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=menage@google.com \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®