linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH] add pagesize field to /proc/pid/numa_maps
@ 2014-10-20 23:27 Petr Holasek
  2014-10-21  1:05 ` David Rientjes
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Holasek @ 2014-10-20 23:27 UTC (permalink / raw)
  To: linux-mm, linux-kernel; +Cc: David Rientjes, Dave Hansen, pholasek

There were some similar attempts to add vma's pagesize to numa_maps in the past,
so I've distilled the most straightforward one - adding pagesize field
expressing size in kbytes to each line. Although page size can be also obtained
from smaps file, adding pagesize to numa_maps makes the interface more compact
and easier to use without need for traversing other files.

New numa_maps output looks like that:

2aaaaac00000 default file=/dev/hugepages/hugepagefile huge pagesize=2097152 dirty=1 N0=1
7f302441a000 default file=/usr/lib64/libc-2.17.so pagesize=4096 mapped=65 mapmax=38 N0=65

Signed-off-by: Petr Holasek <pholasek@redhat.com>
---
 fs/proc/task_mmu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 4e0388c..964c4de 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -1498,6 +1498,9 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
 	if (!md->pages)
 		goto out;
 
+	seq_puts(m, " pagesize=");
+	seq_printf(m, "%lu", vma_kernel_pagesize(vma));
+
 	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 related	[flat|nested] 3+ messages in thread

* Re: [RFC][PATCH] add pagesize field to /proc/pid/numa_maps
  2014-10-20 23:27 [RFC][PATCH] add pagesize field to /proc/pid/numa_maps Petr Holasek
@ 2014-10-21  1:05 ` David Rientjes
  2014-10-22 12:14   ` Petr Holasek
  0 siblings, 1 reply; 3+ messages in thread
From: David Rientjes @ 2014-10-21  1:05 UTC (permalink / raw)
  To: Petr Holasek; +Cc: linux-mm, linux-kernel, Dave Hansen

On Tue, 21 Oct 2014, Petr Holasek wrote:

> There were some similar attempts to add vma's pagesize to numa_maps in the past,
> so I've distilled the most straightforward one - adding pagesize field
> expressing size in kbytes to each line. Although page size can be also obtained
> from smaps file, adding pagesize to numa_maps makes the interface more compact
> and easier to use without need for traversing other files.
> 
> New numa_maps output looks like that:
> 
> 2aaaaac00000 default file=/dev/hugepages/hugepagefile huge pagesize=2097152 dirty=1 N0=1
> 7f302441a000 default file=/usr/lib64/libc-2.17.so pagesize=4096 mapped=65 mapmax=38 N0=65
> 
> Signed-off-by: Petr Holasek <pholasek@redhat.com>

I guess the existing "huge" is insufficient on platforms that support 
multiple hugepage sizes.

--
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] 3+ messages in thread

* Re: [RFC][PATCH] add pagesize field to /proc/pid/numa_maps
  2014-10-21  1:05 ` David Rientjes
@ 2014-10-22 12:14   ` Petr Holasek
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Holasek @ 2014-10-22 12:14 UTC (permalink / raw)
  To: David Rientjes; +Cc: linux-mm, linux-kernel, Dave Hansen

On Mon, 20 Oct 2014, David Rientjes <rientjes@google.com> wrote:
> On Tue, 21 Oct 2014, Petr Holasek wrote:
> 
> > There were some similar attempts to add vma's pagesize to numa_maps in the past,
> > so I've distilled the most straightforward one - adding pagesize field
> > expressing size in kbytes to each line. Although page size can be also obtained
> > from smaps file, adding pagesize to numa_maps makes the interface more compact
> > and easier to use without need for traversing other files.
> > 
> > New numa_maps output looks like that:
> > 
> > 2aaaaac00000 default file=/dev/hugepages/hugepagefile huge pagesize=2097152 dirty=1 N0=1
> > 7f302441a000 default file=/usr/lib64/libc-2.17.so pagesize=4096 mapped=65 mapmax=38 N0=65
> > 
> > Signed-off-by: Petr Holasek <pholasek@redhat.com>
> 
> I guess the existing "huge" is insufficient on platforms that support 
> multiple hugepage sizes.

Why do you think so? pagesize= could also distinguish between multiple hugepage
sizes.

-- 
Petr Holasek
pholasek@redhat.com

--
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] 3+ messages in thread

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-20 23:27 [RFC][PATCH] add pagesize field to /proc/pid/numa_maps Petr Holasek
2014-10-21  1:05 ` David Rientjes
2014-10-22 12:14   ` Petr Holasek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).