From: Andrew Morton <akpm@linux-foundation.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] speed up /proc/pid/stat, statm
Date: Tue, 31 Jan 2012 12:36:12 -0800 [thread overview]
Message-ID: <20120131123612.6b60bdfc.akpm@linux-foundation.org> (raw)
In-Reply-To: <20120131171443.567b53ad.kamezawa.hiroyu@jp.fujitsu.com>
On Tue, 31 Jan 2012 17:14:43 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> +int seq_put_decimal_ll(struct seq_file *m, char delimiter,
> + long long num)
> +{
> + if (num < 0) {
> + if (m->count + 3 >= m->size) {
> + m->count = m->size;
Why is m->count udpated even thought we didn't write any data?
seq_put_decimal_ull() does it too.
> + return -1;
> + }
> + if (delimiter)
> + m->buf[m->count++] = delimiter;
> + num = -num;
> + delimiter = '-';
> + }
> + return seq_put_decimal_ull(m, delimiter, num);
> +
> +}
> +EXPORT_SYMBOL(seq_put_decimal_ll);
next prev parent reply other threads:[~2012-01-31 20:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 8:14 [PATCH] speed up /proc/pid/stat, statm KAMEZAWA Hiroyuki
2012-01-31 20:36 ` Andrew Morton [this message]
2012-01-31 23:55 ` KAMEZAWA Hiroyuki
2012-02-01 5:54 ` Eric Dumazet
2012-02-01 8:56 ` 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=20120131123612.6b60bdfc.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@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.