linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/8] Add selftests for mshare
@ 2025-09-19 13:06 Yongting Lin
  2025-09-19 13:06 ` [PATCH V2 1/8] mshare: Add selftests Yongting Lin
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Yongting Lin @ 2025-09-19 13:06 UTC (permalink / raw)
  To: anthony.yznaga, khalid, shuah
  Cc: linux-kernel, linux-kselftest, akpm, linux-mm, libo.gcs85, Yongting Lin

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).

-----------------

V1->V2:
  - Based on mshare V3, which based on mm-new as of 2025-08-15
  - (Fix) For test cases in basic.c, Change to use a small chunk of
    memory(4k/8K for normal pages, 2M/4M for hugetlb pages), as to
    ensure these tests can run on any server or device.
  - (Fix) For test cases of hugetlb, swap and THP, add a tips to
    configure corresponding settings.
  - (Fix) Add memory to .gitignore file once it exists
  - (fix) Correct the Changelog of THP test case that mshare support
    THP only when user configure shmem_enabled as always

V1:
https://lore.kernel.org/all/20250825145719.29455-1-linyongting@bytedance.com/

Yongting Lin (8):
  mshare: Add selftests
  mshare: selftests: Adding config fragments
  mshare: selftests: Add some helper functions for mshare filesystem
  mshare: selftests: Add test case shared memory
  mshare: selftests: Add test case ioctl unmap
  mshare: selftests: Add some helper functions for configuring and
    retrieving cgroup
  mshare: selftests: Add test case to demostrate the swapping of mshare
    memory
  mshare: selftests: Add test case to demostrate that mshare partly
    supports THP

 tools/testing/selftests/mshare/.gitignore |   4 +
 tools/testing/selftests/mshare/Makefile   |   7 +
 tools/testing/selftests/mshare/basic.c    | 109 ++++++++++
 tools/testing/selftests/mshare/config     |   1 +
 tools/testing/selftests/mshare/memory.c   |  89 ++++++++
 tools/testing/selftests/mshare/util.c     | 254 ++++++++++++++++++++++
 6 files changed, 464 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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-09-19 13:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-19 13:06 [PATCH V2 0/8] Add selftests for mshare Yongting Lin
2025-09-19 13:06 ` [PATCH V2 1/8] mshare: Add selftests Yongting Lin
2025-09-19 13:06 ` [PATCH V2 2/8] mshare: selftests: Adding config fragments Yongting Lin
2025-09-19 13:06 ` [PATCH V2 4/8] mshare: selftests: Add test case shared memory Yongting Lin
2025-09-19 13:06 ` [PATCH V2 5/8] mshare: selftests: Add test case ioctl unmap Yongting Lin
2025-09-19 13:06 ` [PATCH V2 6/8] mshare: selftests: Add some helper functions for configuring and retrieving cgroup Yongting Lin
2025-09-19 13:06 ` [PATCH V2 7/8] mshare: selftests: Add test case to demostrate the swapping of mshare memory Yongting Lin
2025-09-19 13:06 ` [PATCH V2 8/8] mshare: selftests: Add test case to demostrate that mshare partly supports THP Yongting Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox