smaps: add pages referenced count to smaps
commitf79f177c25016647cc92ffac8afa7cb96ce47011
authorDavid Rientjes <rientjes@google.com>
Sun, 6 May 2007 21:49:22 +0000 (6 14:49 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:12:52 +0000 (7 12:12 -0700)
treeb613be041a467fd3ffaed7ad89d8694ede780dfa
parent826fad1b93fdb4ffacfd9cd860f06140e852e377
smaps: add pages referenced count to smaps

Adds an additional unsigned long field to struct mem_size_stats called
'referenced'.  For each pte walked in the smaps code, this field is
incremented by PAGE_SIZE if it has pte-reference bits.

An additional line was added to the /proc/pid/smaps output for each VMA to
indicate how many pages within it are currently marked as referenced or
accessed.

Cc: Hugh Dickins <hugh@veritas.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/task_mmu.c