Re: [PATCH v2 0/9] Add support for shared PTEs across processes

Khalid Aziz
2022-07-06T19:28:01Z

On 7/1/22 22:24, Andrew Morton wrote:
> On Wed, 29 Jun 2022 16:53:51 -0600 Khalid Aziz <khalid.aziz@oracle.com> wrote:
>
>> This patch series implements a mechanism in kernel to allow
>> userspace processes to opt into sharing PTEs. It adds a new
>> in-memory filesystem - msharefs.
>
> Dumb question: why do we need a new filesystem for this? Is it not
> feasible to permit PTE sharing for mmaps of tmpfs/xfs/ext4/etc files?

Hi Andrew,

The new filesystem is meant to provide only the control files for sharing PTE. It contains a file that provides
alignment/size requirement. Other files are created as named objects to represent shared regions and these files provide
information about the size and virtual address for each shared regions when the file is read. Actual shared data is not
hosted on msharefs. Actual data is mmap'ed using anonymous pages, ext4/xfs/btfrfs/etc files.

Thanks,
Khalid