Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1540184
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: perf/jit doesn't cope well with mprotect() to jit containing pages |
| Date | 2016-12-12 09:50 +0100 |
| Message-ID | <sNut4-25U-11@gated-at.bofh.it> (permalink) |
| References | <sMI53-4om-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Dec 09, 2016 at 09:02:18PM -0800, Andres Freund wrote:
>
> I presume the increasing MMAP2 size is triggered by the consecutive
> pages being represented as a single page-range in the kernel?
Yes, we print struct vm_area_struct based information, if vmas get
merged, that shows.
> If I, to work around such consecutive pages, force another page to be
> mmap()ed inbetween, and avoid using MAP_ANONYMOUS, the problem also goes
> away.
This would indeed inhibit vma merging.
> Am I doing something wrong, or is there a bug here?
Expected behaviour afaict
> BTW, it's also a bit weird that those MMAP2 records triggered by
> mprotect/mmap, have prot set to 0...
Yes, mprotect() does: vma->vm_flags = newflags; before calling
perf_event_mmap(vma); which then looks at VM_{READ,WRITE,EXEC} bits in
that word to generate the prot value.
So that being 0 is a bit weird.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
perf/jit doesn't cope well with mprotect() to jit containing pages Andres Freund <andres@anarazel.de> - 2016-12-10 06:10 +0100
Re: perf/jit doesn't cope well with mprotect() to jit containing pages Peter Zijlstra <peterz@infradead.org> - 2016-12-12 09:50 +0100
Re: perf/jit doesn't cope well with mprotect() to jit containing pages Andres Freund <andres@anarazel.de> - 2016-12-12 10:10 +0100
Re: perf/jit doesn't cope well with mprotect() to jit containing pages Peter Zijlstra <peterz@infradead.org> - 2016-12-12 10:30 +0100
csiph-web