Re: [PATCH] perf: map pages in advance
From: Matthew Wilcox
Date: Fri Nov 29 2024 - 15:42:36 EST
On Fri, Nov 29, 2024 at 03:48:33PM +0100, David Hildenbrand wrote:
> Too long, but as some of these TODOs stand in the memdesc way, fortunately
> other people might be able to give a helping hand at some point ;)
;-)
> I'll play with using a page type for some of these "simple" cases and see
> how hard it will get.
I've deliberately made pagetype incompatible with setting a mapcount ...
hugetlb being the exception because we only use entire_mapcount.
Anyway, I agree we need something better than what we have here.
It needs to be simple for a device driver to allocate memory and
map it into userspace. I'm willing to allow perf's ringbuffer to be
a bit harder than most because it's trying to do the weird thing of
writable-first-page-rest-read-only.