Thread (40 messages) flat view 40 messages, 12 authors, 2020-12-01

Re: [RESEND RFC PATCH 0/5] Remote mapping

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2020-09-04 16:11:07
Also in: linux-mm

On Fri, Sep 04, 2020 at 03:40:55PM +0000, Mircea CIRJALIU - MELIU wrote:
quoted
On Fri, Sep 04, 2020 at 02:18:37PM +0000, Mircea CIRJALIU - MELIU wrote:
quoted
quoted
This seems really sketchy, get_user_pages is sensitive to the VMA,
what happens when VMA flags are different/etc?
A debugger shouldn't complain if a portion of the debuggee is
read-only, just overwrite the data.
At this point the kernel API here is so incredibly limited you may as well use a
memfd for passing the shared address space instead of trying to do and
maintain this complexity.

Your use case is only qemu, so what is the problem to replace the allocator
backing VM memory in userspace? Other people have been talking about
doing a memfd already for different reasons - and memfd can already be
shared as this scheme desires.
KSM doesn't work on shmem.
Once you replace the allocator you render KSM useless.
I suspect making memfd to work with KSM will be much less hacky than
this.
Figures out it can peek into any kind of memory involving pages.
No, this approach is really liminted to anonymous VMAs.

You might make some argument that VMA differences can be ignored if
they are all anonymous to start with, but certainly not once other
types are VMAs are included.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help