[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 12 Dec 2016 09:49:03 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Andres Freund <andres@...razel.de>
Cc: linux-kernel@...r.kernel.org,
Stephane Eranian <eranian@...gle.com>, acme@...nel.org,
jolsa@...hat.com, mingo@...e.hu, anton@...abs.org,
namhyung@...nel.org, Stephane Eranian <eranian@...il.com>
Subject: Re: 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.
Powered by blists - more mailing lists