Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1724293

Re: [PATCH 1/5] tracing, mm: Record pfn instead of pointer to struct page

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/5] tracing, mm: Record pfn instead of pointer to struct page
Date 2017-08-31 16:50 +0200
Message-ID <ukyX8-6Qc-25@gated-at.bofh.it> (permalink)
References <peURX-6fs-21@gated-at.bofh.it> <peURY-6fs-25@gated-at.bofh.it> <u9dCG-3sb-17@gated-at.bofh.it> <uky14-6he-11@gated-at.bofh.it> <ukyNs-6MQ-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/5] tracing, mm: Record pfn instead of pointer to  struct page Steven Rostedt <rostedt@goodmis.org> - 2017-08-31 15:50 +0200
  Re: [PATCH 1/5] tracing, mm: Record pfn instead of pointer to struct  page Vlastimil Babka <vbabka@suse.cz> - 2017-08-31 16:40 +0200
    Re: [PATCH 1/5] tracing, mm: Record pfn instead of pointer to  struct page Steven Rostedt <rostedt@goodmis.org> - 2017-08-31 16:50 +0200
      Re: [PATCH 1/5] tracing, mm: Record pfn instead of pointer to struct  page Vlastimil Babka <vbabka@suse.cz> - 2017-09-01 10:20 +0200
        Re: [PATCH 1/5] tracing, mm: Record pfn instead of pointer to  struct page Steven Rostedt <rostedt@goodmis.org> - 2017-09-01 13:20 +0200

csiph-web