Re: [PATCH v1 00/14] Add support for shared PTEs across processes

From: Matthew Wilcox
Date: Mon Apr 11 2022 - 15:08:52 EST


On Mon, Apr 11, 2022 at 11:51:46AM -0700, Dave Hansen wrote:
> On 4/11/22 10:37, Matthew Wilcox wrote:
> > Another argument that MM developers find compelling is that we can reduce
> > some of the complexity in hugetlbfs where it has the ability to share
> > page tables between processes.
>
> When could this complexity reduction actually happen in practice? Can
> this mshare thingy be somehow dropped in underneath the existing
> hugetlbfs implementation? Or would userspace need to change?

Userspace needs to opt in to mshare, so there's going to be a transition
period where we still need hugetlbfs to still support it, but I have
the impression that the users that need page table sharing are pretty
specialised and we'll be able to find them all before disabling it.

I don't think we can make it transparent to userspace, but I'll noodle
on that a bit.