lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20070206220632.31c6dd9e.akpm@linux-foundation.org>
Date:	Tue, 6 Feb 2007 22:06:32 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Hugh Dickins <hugh@...itas.com>, Paul Mundt <lethal@...ux-sh.org>,
	Christoph Lameter <clameter@....com>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 2/3] smaps: add pages referenced count to smaps

On Tue, 6 Feb 2007 21:56:23 -0800 (PST) David Rientjes <rientjes@...gle.com> wrote:

> On Tue, 6 Feb 2007, Andrew Morton wrote:
> 
> > > @@ -190,18 +191,20 @@ static int show_map_internal(struct seq_file *m, void *v, struct mem_size_stats
> > >  
> > >  	if (mss)
> > >  		seq_printf(m,
> > > -			   "Size:          %8lu kB\n"
> > > -			   "Rss:           %8lu kB\n"
> > > -			   "Shared_Clean:  %8lu kB\n"
> > > -			   "Shared_Dirty:  %8lu kB\n"
> > > -			   "Private_Clean: %8lu kB\n"
> > > -			   "Private_Dirty: %8lu kB\n",
> > > +			   "Size:           %8lu kB\n"
> > > +			   "Rss:            %8lu kB\n"
> > > +			   "Shared_Clean:   %8lu kB\n"
> > > +			   "Shared_Dirty:   %8lu kB\n"
> > > +			   "Private_Clean:  %8lu kB\n"
> > > +			   "Private_Dirty:  %8lu kB\n"
> > > +			   "Pgs_Referenced: %8li\n",
> > 
> > I guess we might as well make this %8lu kB as well?
> > 
> 
> Ah, %8lu would work since it's a count of pages and not a size.

All the other fields in there are using kbytes.  We might as well be
consistent.

Plus if we express the quantity in bytes, userspace doesn't need to know
what the pagesize is.  If we were to express it in pages, an app on a 64k
pagesize kernel will show very different numbers from the same app on a 4k
pagesize kernel.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ