linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Petr Holasek <pholasek@redhat.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: David Rientjes <rientjes@google.com>,
	Dave Hansen <dave.hansen@intel.com>,
	pholasek@redhat.com
Subject: [RFC][PATCH] add pagesize field to /proc/pid/numa_maps
Date: Tue, 21 Oct 2014 01:27:14 +0200	[thread overview]
Message-ID: <1413847634-20039-1-git-send-email-pholasek@redhat.com> (raw)

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>

             reply	other threads:[~2014-10-20 23:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 23:27 Petr Holasek [this message]
2014-10-21  1:05 ` [RFC][PATCH] add pagesize field to /proc/pid/numa_maps David Rientjes
2014-10-22 12:14   ` Petr Holasek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413847634-20039-1-git-send-email-pholasek@redhat.com \
    --to=pholasek@redhat.com \
    --cc=dave.hansen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).