linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] fs: proc: task_mmu: show page size in /proc/<pid>/numa_maps
@ 2015-01-05 17:44 Rafael Aquini
  2015-01-05 21:35 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael Aquini @ 2015-01-05 17:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, jweiner, dave.hansen, rientjes, linux-mm

This patch introduces 'kernelpagesize_kB' line element to /proc/<pid>/numa_maps
report file in order to help identifying the size of pages that are backing
memory areas mapped by a given task. This is specially useful to
help differentiating between HUGE and GIGANTIC page backed VMAs.

This patch is based on Dave Hansen's proposal and reviewer's follow-ups
taken from the following dicussion threads:
 * https://lkml.org/lkml/2011/9/21/454
 * https://lkml.org/lkml/2014/12/20/66

Signed-off-by: Rafael Aquini <aquini@redhat.com>
---
* v2 changelog:
  . print kernel page size unconditionally (jweiner, dhansen)
  . rename pagesize to match smaps terminology (dhansen, drientjes)

 fs/proc/task_mmu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 246eae8..3688d64 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -1533,6 +1533,8 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
 	if (!md->pages)
 		goto out;
 
+	seq_printf(m, " kernelpagesize_kB=%lu", vma_kernel_pagesize(vma) >> 10);
+
 	if (md->anon)
 		seq_printf(m, " anon=%lu", md->anon);
 
-- 
1.9.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-06  0:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-05 17:44 [PATCH v2] fs: proc: task_mmu: show page size in /proc/<pid>/numa_maps Rafael Aquini
2015-01-05 21:35 ` Andrew Morton
2015-01-05 22:55   ` Rafael Aquini
2015-01-05 23:08     ` Rafael Aquini
     [not found]     ` <20150105152037.5a33e34652db6b82fcfd46bf@linux-foundation.org>
2015-01-06  0:21       ` Rafael Aquini
2015-01-06  0:31         ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox