LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Hugh Dickins <hugh@veritas.com>, Paul Mundt <lethal@linux-sh.org>,
	Christoph Lameter <clameter@sgi.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 2/3] smaps: add pages referenced count to smaps
Date: Tue, 6 Feb 2007 22:06:32 -0800	[thread overview]
Message-ID: <20070206220632.31c6dd9e.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0702062154530.9073@chino.kir.corp.google.com>

On Tue, 6 Feb 2007 21:56:23 -0800 (PST) David Rientjes <rientjes@google.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.


  reply	other threads:[~2007-02-07  6:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07  5:26 [patch 1/3] smaps: extract pte walker from smaps code David Rientjes
2007-02-07  5:27 ` [patch 2/3] smaps: add pages referenced count to smaps David Rientjes
2007-02-07  5:27   ` [patch 3/3] smaps: add clear_refs file to clear reference David Rientjes
2007-02-07  5:44   ` [patch 2/3] smaps: add pages referenced count to smaps Andrew Morton
2007-02-07  5:56     ` David Rientjes
2007-02-07  6:06       ` Andrew Morton [this message]
2007-02-09 19:35 [patch 1/3] smaps: extract pmd walker from smaps code David Rientjes
2007-02-09 19:36 ` [patch 2/3] smaps: add pages referenced count to smaps David Rientjes

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=20070206220632.31c6dd9e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=hugh@veritas.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --subject='Re: [patch 2/3] smaps: add pages referenced count to smaps' \
    /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

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).