From: Andrei Vagin <avagin@virtuozzo.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andrei Vagin <avagin@openvz.org>,
linux-fsdevel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [PATCH v2] procfs: add seq_put_hex_ll to speed up /proc/pid/maps
Date: Fri, 9 Feb 2018 23:50:01 -0800 [thread overview]
Message-ID: <20180210075000.GA386@outlook.office365.com> (raw)
In-Reply-To: <20180209134847.GA6916@avx2>
On Fri, Feb 09, 2018 at 04:48:47PM +0300, Alexey Dobriyan wrote:
> On Wed, Jan 17, 2018 at 12:20:50AM -0800, Andrei Vagin wrote:
> > + * seq_put_hex_ll(m, "", v, 8) is equal to seq_printf(m, "0x08llx", v)
>
> No, it is not. Scratch "0x".
will fix
>
> > +void seq_put_hex_ll(struct seq_file *m, const char *delimiter,
> > + unsigned long long v, int width)
>
> I understand that "unsigned long long" mimics decimal counterpart,
> but in thie case everything is "unsigned long" including ->vm_pgoff.
I've checked that the performance is the same for "unsigned long long" and
"unsigned long". Do we have other reasons to use "unsigned long" rather
than "unsigned long long"?
>
> Also, width should be unsigned for the common case of %08lx
> (and "len" too)
will fix
Thank you for the review.
>
> > +{
> > + int i, len;
> > +
next prev parent reply other threads:[~2018-02-10 7:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 18:58 [PATCH 1/2] procfs: add seq_put_hex_ll to speed up /proc/pid/maps Andrei Vagin
2018-01-12 18:58 ` [PATCH 2/2] procfs: optimize seq_pad() " Andrei Vagin
2018-01-12 23:33 ` [PATCH 1/2] procfs: add seq_put_hex_ll " Andrew Morton
2018-01-15 7:04 ` Andrei Vagin
2018-01-17 8:20 ` [PATCH v2] " Andrei Vagin
2018-02-09 13:48 ` Alexey Dobriyan
2018-02-10 7:50 ` Andrei Vagin [this message]
2018-02-12 22:15 ` Alexey Dobriyan
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=20180210075000.GA386@outlook.office365.com \
--to=avagin@virtuozzo.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@openvz.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-fsdevel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).