From: Andrew Morton <akpm@linux-foundation.org>
To: Rafael Aquini <aquini@redhat.com>
Cc: linux-kernel@vger.kernel.org, jweiner@redhat.com,
dave.hansen@linux.intel.com, rientjes@google.com,
linux-mm@kvack.org
Subject: Re: [PATCH v2] fs: proc: task_mmu: show page size in /proc/<pid>/numa_maps
Date: Mon, 5 Jan 2015 16:31:46 -0800 [thread overview]
Message-ID: <20150105163146.c9576414bce83978278cb549@linux-foundation.org> (raw)
In-Reply-To: <20150106002134.GC28105@t510.redhat.com>
On Mon, 5 Jan 2015 19:21:35 -0500 Rafael Aquini <aquini@redhat.com> wrote:
> > > >
> > > >
> > > > > + seq_printf(m, " kernelpagesize_kB=%lu", vma_kernel_pagesize(vma) >> 10);
> > > >
> > > > This changes the format of the numa_maps file and can potentially break
> > > > existing parsers. Please discuss.
> >
> > ^^ ??
> >
> Sorry I overlooked it.
>
> Parsers indeed would have to be adjusted to cope with an extra line element
> (they already have to do so, similarly, for the conditional 'huge' hint).
> Despite I don't think of it as a showstopper (as is), I think we can consider
> moving it to EOL, if its actual printout position turns out to be an issue.
>
>
> For instance, with this patch a numa_maps line would look like the following:
>
> 7ff965200000 default file=/anon_hugepage\040(deleted) huge kernelpagesize_kB=2048 anon=5 dirty=5 N0=5
>
>
> or it could look like this, if we decide to switch kernelpagesize_kB position to EOL,
> for the sake of parsers:
>
> 7ff965200000 default file=/anon_hugepage\040(deleted) huge anon=5 dirty=5 N0=5 kernelpagesize_kB=2048
hm, OK, numa_maps is actually a pretty complex thing: it's a
combination of `name' and `name=value'. Some fields may be absent.
Parsers need to fully parse each field and can't make assumptions based
on field number.
So yes, I agree that any parser which actually works is unlikely to
break due to this change. However it's probably a bit safer to put the
new field at the end of the line.
--
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>
prev parent reply other threads:[~2015-01-06 0:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 17:44 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 message]
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=20150105163146.c9576414bce83978278cb549@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=aquini@redhat.com \
--cc=dave.hansen@linux.intel.com \
--cc=jweiner@redhat.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