lkml.org 
[lkml]   [2016]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: perf/jit doesn't cope well with mprotect() to jit containing pages
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.

\
 
 \ /
  Last update: 2016-12-12 09:50    [W:0.261 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site