linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] proc: task_mmu: show page size in /proc/<pid>/numa_maps
@ 2014-12-20 13:54 Rafael Aquini
  2014-12-20 16:40 ` Dave Hansen
  2014-12-20 18:36 ` Johannes Weiner
  0 siblings, 2 replies; 11+ messages in thread
From: Rafael Aquini @ 2014-12-20 13:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, oleg, dave.hansen, rientjes, linux-mm

This patch introduces 'pagesize' line element to /proc/<pid>/numa_maps
report file in order to help disambiguating the size of pages that are
backing memory areas mapped by a task. When the VMA backing page size
is observed different from kernel's default PAGE_SIZE, the new element 
is printed out to complement report output. This is specially useful to
help differentiating between HUGE and GIGANTIC page VMAs.

This patch is based on Dave Hansen's proposal and reviewer's follow ups 
taken from this dicussion: https://lkml.org/lkml/2011/9/21/454

Signed-off-by: Rafael Aquini <aquini@redhat.com>
---
 fs/proc/task_mmu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 246eae8..9f2e2c8 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -1479,6 +1479,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
 	struct mm_struct *mm = vma->vm_mm;
 	struct mm_walk walk = {};
 	struct mempolicy *pol;
+	unsigned long page_size;
 	char buffer[64];
 	int nid;
 
@@ -1533,6 +1534,10 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
 	if (!md->pages)
 		goto out;
 
+	page_size = vma_kernel_pagesize(vma);
+	if (page_size != PAGE_SIZE)
+		seq_printf(m, " pagesize=%lu", page_size);
+
 	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] 11+ messages in thread

end of thread, other threads:[~2014-12-22 22:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-20 13:54 [PATCH] proc: task_mmu: show page size in /proc/<pid>/numa_maps Rafael Aquini
2014-12-20 16:40 ` Dave Hansen
2014-12-22 22:27   ` David Rientjes
2014-12-20 18:36 ` Johannes Weiner
2014-12-20 19:44   ` Rafael Aquini
2014-12-21 18:02     ` Dave Hansen
2014-12-21 22:28       ` Rafael Aquini
2014-12-22 17:10         ` Dave Hansen
2014-12-22 17:25           ` Rafael Aquini
2014-12-22 17:59             ` Dave Hansen
2014-12-22 22:21               ` David Rientjes

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