From: Andrew Morton <akpm@linux-foundation.org>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: kobayashi.kk@ncos.nec.co.jp, kosaki.motohiro@jp.fujitsu.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] per-task-delay-accounting: /proc export for memory reclaim delay
Date: Wed, 4 Jun 2008 15:41:24 -0700 [thread overview]
Message-ID: <20080604154124.5b5b5bf7.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080604120235.940B.KOSAKI.MOTOHIRO@jp.fujitsu.com>
On Wed, 04 Jun 2008 12:07:29 +0900
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> Hi
>
> > diff --git a/fs/proc/array.c b/fs/proc/array.c
> > index 9e3b8c3..a3e6e86 100644
> > --- a/fs/proc/array.c
> > +++ b/fs/proc/array.c
> > @@ -498,7 +498,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
> >
> > seq_printf(m, "%d (%s) %c %d %d %d %d %d %u %lu \
> > %lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \
> > -%lu %lu %lu %lu %lu %lu %lu %lu %d %d %u %u %llu %lu %ld\n",
> > +%lu %lu %lu %lu %lu %lu %lu %lu %d %d %u %u %llu %llu %lu %ld\n",
> > pid_nr_ns(pid, ns),
> > tcomm,
> > state,
> > @@ -544,6 +544,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
> > task->rt_priority,
> > task->policy,
> > (unsigned long long)delayacct_blkio_ticks(task),
> > + (unsigned long long)delayacct_freepages_ticks(task),
> > cputime_to_clock_t(gtime),
> > cputime_to_clock_t(cgtime));
>
> userland program oftern below access.
> thus, this patch break userland compatibility.
>
> ----------------------------------------
> #!/usr/bin/perl
>
> $stat = `cat /proc/$pid/stat`;
> split
> @stat_list = split(/ / , $stat);
> print stat_list[$index];
> ^
> |
> use array index number
>
Any application which breaks if we add more things to /proc/pid/stat
just needs to be fixed.
But we can't add new fields in the middle of the line! We can only add
new items to the end.
But I think it would be good if we just weren't to make this change.
Do we really want to keep reporting the same information in two
separate ways?
If so, a new /proc/pid/delays would be a better way, but it might be a
bit late for doing that now, given that we already put
delayacct_blkio_ticks into /proc/pid/stat.
next prev parent reply other threads:[~2008-06-04 22:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-04 2:38 [PATCH 1/4] per-task-delay-accounting: add memory reclaim delay Keika Kobayashi
2008-06-04 2:42 ` [PATCH 2/4] per-task-delay-accounting: update taskstats for memory Keika Kobayashi
2008-06-04 2:59 ` KOSAKI Motohiro
2008-06-04 3:20 ` [PATCH 2/4] per-task-delay-accounting: update taskstats for memory reclaim delay Keika Kobayashi
2008-06-04 2:44 ` [PATCH 3/4] per-task-delay-accounting: update document and getdelays.c for memory reclaim Keika Kobayashi
2008-06-04 2:46 ` [PATCH 4/4] per-task-delay-accounting: /proc export for memory reclaim delay Keika Kobayashi
2008-06-04 3:07 ` KOSAKI Motohiro
2008-06-04 4:11 ` Keika Kobayashi
2008-06-04 4:26 ` KOSAKI Motohiro
2008-06-04 17:47 ` Hiroshi Shimamoto
2008-06-04 22:41 ` Andrew Morton [this message]
2008-06-05 2:30 ` Keika Kobayashi
2008-06-04 3:00 ` [PATCH 1/4] per-task-delay-accounting: add " KOSAKI Motohiro
2008-06-04 17:51 ` Hiroshi Shimamoto
2008-06-05 0:50 ` KOSAKI Motohiro
2008-06-05 18:56 ` Hiroshi Shimamoto
2008-06-04 3:15 ` KOSAKI Motohiro
2008-06-04 3:40 ` Keika Kobayashi
2008-06-04 6:00 ` 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=20080604154124.5b5b5bf7.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=kobayashi.kk@ncos.nec.co.jp \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.