From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com ([74.125.82.49]:51980 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932493AbeBLWPG (ORCPT ); Mon, 12 Feb 2018 17:15:06 -0500 Received: by mail-wm0-f49.google.com with SMTP id r71so12395428wmd.1 for ; Mon, 12 Feb 2018 14:15:05 -0800 (PST) Date: Tue, 13 Feb 2018 01:15:02 +0300 From: Alexey Dobriyan To: Andrei Vagin Cc: Andrei Vagin , linux-fsdevel@vger.kernel.org, Andrew Morton , KAMEZAWA Hiroyuki Subject: Re: [PATCH v2] procfs: add seq_put_hex_ll to speed up /proc/pid/maps Message-ID: <20180212221502.GA15398@avx2> References: <20180112153304.f4a7dfbae2942e3fdd93eab9@linux-foundation.org> <20180117082050.25406-1-avagin@openvz.org> <20180209134847.GA6916@avx2> <20180210075000.GA386@outlook.office365.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180210075000.GA386@outlook.office365.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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.