From: Alexey Dobriyan <adobriyan@gmail.com>
To: Andrei Vagin <avagin@virtuozzo.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: Tue, 13 Feb 2018 01:15:02 +0300 [thread overview]
Message-ID: <20180212221502.GA15398@avx2> (raw)
In-Reply-To: <20180210075000.GA386@outlook.office365.com>
On Fri, Feb 09, 2018 at 11:50:01PM -0800, Andrei Vagin wrote:
> 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"?
On 32-bit those types are different.
But I guess as seq_put_decimal is ull, it is worse to deviate.
prev parent reply other threads:[~2018-02-12 22:15 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
2018-02-12 22:15 ` Alexey Dobriyan [this message]
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=20180212221502.GA15398@avx2 \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@openvz.org \
--cc=avagin@virtuozzo.com \
--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).