Re: [PATCH v2] procfs: add seq_put_hex_ll to speed up /proc/pid/maps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux