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 21:44:14 -0800 [thread overview]
Message-ID: <20070206214414.96b0336b.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0702062122540.8623@chino.kir.corp.google.com>
On Tue, 6 Feb 2007 21:27:03 -0800 (PST) David Rientjes <rientjes@google.com> 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?
> (vma->vm_end - vma->vm_start) >> 10,
> mss->resident >> 10,
> mss->shared_clean >> 10,
> mss->shared_dirty >> 10,
> mss->private_clean >> 10,
> - mss->private_dirty >> 10);
> + mss->private_dirty >> 10,
> + mss->referenced);
>
> ...
>
> + /* Accumulate the number of pages that have been accessed. */
> + if (PageReferenced(page))
> + mss->referenced++;
This is testing the software-referenced bit. We want to be counting the
pte-referenced bits (pte_young).
Hence poking clear_refs should run pte_mkold().
Perhaps we should also be running ClearPageReferenced and counting pages
which are pte_young()||PageReferenced.
next prev parent reply other threads:[~2007-02-07 5:44 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 ` Andrew Morton [this message]
2007-02-07 5:56 ` [patch 2/3] smaps: add pages referenced count to smaps David Rientjes
2007-02-07 6:06 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
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=20070206214414.96b0336b.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 \
/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