From: Steven Rostedt <rostedt@goodmis.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org, Namhyung Kim <namhyung@kernel.org>,
David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@redhat.com>,
Minchan Kim <minchan@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-mm@kvack.org
Subject: Re: [PATCH 1/5] tracing, mm: Record pfn instead of pointer to struct page
Date: Thu, 31 Aug 2017 10:44:10 -0400 [thread overview]
Message-ID: <20170831104410.09777356@gandalf.local.home> (raw)
In-Reply-To: <ea9f2ead-e69a-ff6a-debd-73f8e52cc620@suse.cz>
On Thu, 31 Aug 2017 16:31:36 +0200
Vlastimil Babka <vbabka@suse.cz> wrote:
> > Which version of trace-cmd failed? It parses for me. Hmm, the
> > vmemmap_base isn't in the event format file. It's the actually address.
> > That's probably what failed to parse.
>
> Mine says 2.6. With 4.13-rc6 I get FAILED TO PARSE.
Right, but you have the vmemmap_base in the event format, which can't
be parsed by userspace because it has no idea what the value of the
vmemmap_base is.
>
> >
> >>
> >> I'm quite sure it's due to the "page=%p" part, which uses pfn_to_page().
> >> The events/kmem/mm_page_alloc/format file contains this for page:
> >>
> >> REC->pfn != -1UL ? (((struct page *)vmemmap_base) + (REC->pfn)) : ((void *)0)
> >
> >> On older 4.4-based kernel:
> >>
> >> REC->pfn != -1UL ? (((struct page *)(0xffffea0000000000UL)) + (REC->pfn)) : ((void *)0)
> >
> > This is what I have on 4.13-rc7
> >
> >>
> >> This also fails to parse, so it must be the struct page part?
> >
> > Again, what version of trace-cmd do you have?
>
> On the older distro it was 2.0.4
Right. That's probably why it failed to parse here. If you installed
the latest trace-cmd from the git repo, it probably will parse fine.
>
> >
> >>
> >> I think the problem is, even if ve solve this with some more
> >> preprocessor trickery to make the format file contain only constant
> >> numbers, pfn_to_page() on e.g. sparse memory model without vmmemap is
> >> more complicated than simple arithmetic, and can't be exported in the
> >> format file.
> >>
> >> I'm afraid that to support userspace parsing of the trace data, we will
> >> have to store both struct page and pfn... or perhaps give up on reporting
> >> the struct page pointer completely. Thoughts?
> >
> > Had some thoughts up above.
>
> Yeah, it could be made to work for some configurations, but see the part
> about "sparse memory model without vmemmap" above.
Right, but that should work with the latest trace-cmd. Does it?
-- Steve
--
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>
next prev parent reply other threads:[~2017-08-31 14:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 22:14 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-04-13 22:14 ` [PATCH 1/5] tracing, mm: Record pfn instead of pointer to struct page Arnaldo Carvalho de Melo
2017-07-31 7:43 ` Vlastimil Babka
2017-08-31 11:38 ` Vlastimil Babka
2017-08-31 13:43 ` Steven Rostedt
2017-08-31 14:31 ` Vlastimil Babka
2017-08-31 14:44 ` Steven Rostedt [this message]
2017-09-01 8:16 ` Vlastimil Babka
2017-09-01 11:15 ` Steven Rostedt
2015-04-13 22:14 ` [PATCH 2/5] perf kmem: Analyze page allocator events also Arnaldo Carvalho de Melo
2015-04-13 22:33 ` [GIT PULL 0/5] perf/core improvements and fixes Masami Hiramatsu
2015-04-13 23:09 ` Arnaldo Carvalho de Melo
2015-04-13 23:19 ` Arnaldo Carvalho de Melo
2015-04-14 7:04 ` Masami Hiramatsu
2015-04-14 12:17 ` Arnaldo Carvalho de Melo
2015-04-14 12:12 ` Ingo Molnar
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=20170831104410.09777356@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=vbabka@suse.cz \
/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