Thread (52 messages) 52 messages, 8 authors, 2026-02-27

Re: [PATCH v3 00/22] Add support for shared PTEs across processes

From: Anthony Yznaga <hidden>
Date: 2025-09-08 21:15:43
Also in: linux-arch, linux-mm, lkml


On 9/8/25 1:59 PM, Matthew Wilcox wrote:
On Mon, Sep 08, 2025 at 10:32:22PM +0200, David Hildenbrand wrote:
quoted
In the context of this series, how do we handle VMA-modifying functions like
mprotect/some madvise/mlock/mempolicy/...? Are they currently blocked when
applied to a mshare VMA?
I haven't been following this series recently, so I'm not sure what
Anthony will say.  My expectation is that the shared VMA is somewhat
transparent to these operations; that is they are faulty if they span
the boundary of the mshare VMA, but otherwise they pass through and
affect the shared VMAs.

That does raise the interesting question of how mlockall() affects
an mshare VMA.  I'm tempted to say that it should affect the shared
VMA, but reasonable people might well disagree with me and have
excellent arguments.
quoted
And how are we handling other page table walkers that don't modify VMAs like
MADV_DONTNEED, smaps, migrate_pages, ... etc?
I'd expect those to walk into the shared region too.
I've received conflicting feedback in previous discussions that things 
like protection changes should be done via ioctl. I do thing somethings 
are appropriate for ioctl like map and unmap, but I also like the idea 
of the existing APIs being transparent to mshare so long as they are 
operating entirely with an mshare range and not crossing boundaries.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help