diff options
author | Mel Gorman <mel@csn.ul.ie> | 2009-01-06 17:38:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 18:58:58 -0500 |
commit | 3340289ddf29ca75c3acfb3a6b72f234b2f74d5c (patch) | |
tree | d5da94eb1cb0146160fcb0e7aa161bfa5b6ac807 /fs/proc | |
parent | 08fba69986e20c1c9e5fe2e6064d146cc4f42480 (diff) |
mm: report the MMU pagesize in /proc/pid/smaps
The KernelPageSize entry in /proc/pid/smaps is the pagesize used by the
kernel to back a VMA. This matches the size used by the MMU in the
majority of cases. However, one counter-example occurs on PPC64 kernels
whereby a kernel using 64K as a base pagesize may still use 4K pages for
the MMU on older processor. To distinguish, this patch reports
MMUPageSize as the pagesize used by the MMU in /proc/pid/smaps.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: "KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/task_mmu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 41ef5f23e779..94063840832a 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -397,7 +397,8 @@ static int show_smap(struct seq_file *m, void *v) | |||
397 | "Private_Dirty: %8lu kB\n" | 397 | "Private_Dirty: %8lu kB\n" |
398 | "Referenced: %8lu kB\n" | 398 | "Referenced: %8lu kB\n" |
399 | "Swap: %8lu kB\n" | 399 | "Swap: %8lu kB\n" |
400 | "KernelPageSize: %8lu kB\n", | 400 | "KernelPageSize: %8lu kB\n" |
401 | "MMUPageSize: %8lu kB\n", | ||
401 | (vma->vm_end - vma->vm_start) >> 10, | 402 | (vma->vm_end - vma->vm_start) >> 10, |
402 | mss.resident >> 10, | 403 | mss.resident >> 10, |
403 | (unsigned long)(mss.pss >> (10 + PSS_SHIFT)), | 404 | (unsigned long)(mss.pss >> (10 + PSS_SHIFT)), |
@@ -407,7 +408,8 @@ static int show_smap(struct seq_file *m, void *v) | |||
407 | mss.private_dirty >> 10, | 408 | mss.private_dirty >> 10, |
408 | mss.referenced >> 10, | 409 | mss.referenced >> 10, |
409 | mss.swap >> 10, | 410 | mss.swap >> 10, |
410 | vma_kernel_pagesize(vma) >> 10); | 411 | vma_kernel_pagesize(vma) >> 10, |
412 | vma_mmu_pagesize(vma) >> 10); | ||
411 | 413 | ||
412 | if (m->count < m->size) /* vma is copied successfully */ | 414 | if (m->count < m->size) /* vma is copied successfully */ |
413 | m->version = (vma != get_gate_vma(task)) ? vma->vm_start : 0; | 415 | m->version = (vma != get_gate_vma(task)) ? vma->vm_start : 0; |