[PATCH 0/8] Add selftests for mshare

Yongting Lin posted 8 patches 1 month, 1 week ago
There is a newer version of this series
tools/testing/selftests/mshare/.gitignore |   3 +
tools/testing/selftests/mshare/Makefile   |   7 +
tools/testing/selftests/mshare/basic.c    | 108 ++++++++++
tools/testing/selftests/mshare/config     |   1 +
tools/testing/selftests/mshare/memory.c   |  82 +++++++
tools/testing/selftests/mshare/util.c     | 251 ++++++++++++++++++++++
6 files changed, 452 insertions(+)
create mode 100644 tools/testing/selftests/mshare/.gitignore
create mode 100644 tools/testing/selftests/mshare/Makefile
create mode 100644 tools/testing/selftests/mshare/basic.c
create mode 100644 tools/testing/selftests/mshare/config
create mode 100644 tools/testing/selftests/mshare/memory.c
create mode 100644 tools/testing/selftests/mshare/util.c
[PATCH 0/8] Add selftests for mshare
Posted by Yongting Lin 1 month, 1 week ago
Mshare is a developing feature proposed by Anthony Yznaga and Khalid Aziz
that enables sharing of PTEs across processes. The V3 patch set has been
posted for review:

https://lore.kernel.org/linux-mm/20250820010415.699353-1-anthony.yznaga@oracle.com/

This patch set adds selftests to exercise and demonstrate basic
functionality of mshare.

The initial tests use open, ioctl, and mmap syscalls to establish a shared
memory mapping between two processes and verify the expected behavior.

Additional tests are included to check interoperability with swap and
Transparent Huge Pages.

Future work will extend coverage to other use cases such as integration
with KVM and more advanced scenarios.

This series is intended to be applied on top of mshare V3, which is
based on mm-new (2025-08-15).

Yongting Lin (8):
  mshare: Add selftests
  mshare: selftests: Adding config fragment
  mshare: selftests: Add some helper function for mshare filesystem
  mshare: selftests: Add test case shared memory
  mshare: selftests: Add test case ioctl unmap
  mshare: selftests: Add some helper functions for reading and
    controlling cgroup
  mshare: selftests: Add test case to demostrate the swaping of mshare
    memory
  mshare: selftests: Add test case to demostrate that mshare doesn't
    support THP

 tools/testing/selftests/mshare/.gitignore |   3 +
 tools/testing/selftests/mshare/Makefile   |   7 +
 tools/testing/selftests/mshare/basic.c    | 108 ++++++++++
 tools/testing/selftests/mshare/config     |   1 +
 tools/testing/selftests/mshare/memory.c   |  82 +++++++
 tools/testing/selftests/mshare/util.c     | 251 ++++++++++++++++++++++
 6 files changed, 452 insertions(+)
 create mode 100644 tools/testing/selftests/mshare/.gitignore
 create mode 100644 tools/testing/selftests/mshare/Makefile
 create mode 100644 tools/testing/selftests/mshare/basic.c
 create mode 100644 tools/testing/selftests/mshare/config
 create mode 100644 tools/testing/selftests/mshare/memory.c
 create mode 100644 tools/testing/selftests/mshare/util.c

-- 
2.20.1
Re: [PATCH 0/8] Add selftests for mshare
Posted by Yongting Lin 1 month, 1 week ago
Sorry for the mistake! I accidentally sent each individual patch twice,
except for the cover letter. Please ignore the duplicated ones at the
bottom.

Apologies again for the noise.

Yongting Lin.

On Mon, Aug 25, 2025 at 10:57 PM Yongting Lin <linyongting@bytedance.com> wrote:
>
> Mshare is a developing feature proposed by Anthony Yznaga and Khalid Aziz
> that enables sharing of PTEs across processes. The V3 patch set has been
> posted for review:
>
> https://lore.kernel.org/linux-mm/20250820010415.699353-1-anthony.yznaga@oracle.com/
>
> This patch set adds selftests to exercise and demonstrate basic
> functionality of mshare.
>
> The initial tests use open, ioctl, and mmap syscalls to establish a shared
> memory mapping between two processes and verify the expected behavior.
>
> Additional tests are included to check interoperability with swap and
> Transparent Huge Pages.
>
> Future work will extend coverage to other use cases such as integration
> with KVM and more advanced scenarios.
>
> This series is intended to be applied on top of mshare V3, which is
> based on mm-new (2025-08-15).
>
> Yongting Lin (8):
>   mshare: Add selftests
>   mshare: selftests: Adding config fragment
>   mshare: selftests: Add some helper function for mshare filesystem
>   mshare: selftests: Add test case shared memory
>   mshare: selftests: Add test case ioctl unmap
>   mshare: selftests: Add some helper functions for reading and
>     controlling cgroup
>   mshare: selftests: Add test case to demostrate the swaping of mshare
>     memory
>   mshare: selftests: Add test case to demostrate that mshare doesn't
>     support THP
>
>  tools/testing/selftests/mshare/.gitignore |   3 +
>  tools/testing/selftests/mshare/Makefile   |   7 +
>  tools/testing/selftests/mshare/basic.c    | 108 ++++++++++
>  tools/testing/selftests/mshare/config     |   1 +
>  tools/testing/selftests/mshare/memory.c   |  82 +++++++
>  tools/testing/selftests/mshare/util.c     | 251 ++++++++++++++++++++++
>  6 files changed, 452 insertions(+)
>  create mode 100644 tools/testing/selftests/mshare/.gitignore
>  create mode 100644 tools/testing/selftests/mshare/Makefile
>  create mode 100644 tools/testing/selftests/mshare/basic.c
>  create mode 100644 tools/testing/selftests/mshare/config
>  create mode 100644 tools/testing/selftests/mshare/memory.c
>  create mode 100644 tools/testing/selftests/mshare/util.c
>
> --
> 2.20.1
>