[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <c97f30472ec5fe79cb8fa8be66cc3d8509777990.1419079617.git.aquini@redhat.com>
Date: Sat, 20 Dec 2014 08:54:45 -0500
From: Rafael Aquini <aquini@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: akpm@...ux-foundation.org, oleg@...hat.com,
dave.hansen@...ux.intel.com, rientjes@...gle.com,
linux-mm@...ck.org
Subject: [PATCH] proc: task_mmu: show page size in /proc/<pid>/numa_maps
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@...hat.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists