linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] selftests/mm: add memory failure selftests
@ 2026-02-04  7:33 Miaohe Lin
  2026-02-04  7:33 ` [PATCH v3 1/3] selftests/mm: add memory failure anonymous page test Miaohe Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Miaohe Lin @ 2026-02-04  7:33 UTC (permalink / raw)
  To: akpm, shuah
  Cc: david, lorenzo.stoakes, Liam.Howlett, vbabka, rppt, surenb,
	mhocko, nao.horiguchi, broonie, linmiaohe, linux-mm,
	linux-kernel, linux-kselftest

Introduce selftests to validate the functionality of memory failure.
These tests help ensure that memory failure handling for anonymous
pages, pagecaches pages works correctly, including proper SIGBUS
delivery to user processes, page isolation, and recovery paths.

Currently madvise syscall is used to inject memory failures. And only
anonymous pages and pagecaches are tested. More test scenarios, e.g.
hugetlb, shmem, thp, will be added. Also more memory failure injecting
methods will be supported, e.g. APEI Error INJection, if required.

---
Changes in v3:
  Add HWPOISON_INJECT and MEMORY_FAILURE to config per Mark.
  Fix kernel test robot warning.

Changes in v2:
  Add some codes to guard pagecache testcases against tmpfs. Testcases
for tmpfs will be added soon.

  Thanks!
---
Miaohe Lin (3):
  selftests/mm: add memory failure anonymous page test
  selftests/mm: add memory failure clean pagecache test
  selftests/mm: add memory failure dirty pagecache test

 MAINTAINERS                                 |   1 +
 tools/testing/selftests/mm/.gitignore       |   1 +
 tools/testing/selftests/mm/Makefile         |   1 +
 tools/testing/selftests/mm/config           |   2 +
 tools/testing/selftests/mm/memory-failure.c | 359 ++++++++++++++++++++
 tools/testing/selftests/mm/run_vmtests.sh   |  21 ++
 tools/testing/selftests/mm/vm_util.c        |  41 +++
 tools/testing/selftests/mm/vm_util.h        |   3 +
 8 files changed, 429 insertions(+)
 create mode 100644 tools/testing/selftests/mm/memory-failure.c

-- 
2.33.0



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

end of thread, other threads:[~2026-02-06  2:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-04  7:33 [PATCH v3 0/3] selftests/mm: add memory failure selftests Miaohe Lin
2026-02-04  7:33 ` [PATCH v3 1/3] selftests/mm: add memory failure anonymous page test Miaohe Lin
2026-02-04 11:26   ` Mark Brown
2026-02-05  6:58     ` Miaohe Lin
2026-02-05 11:28       ` Mark Brown
2026-02-06  2:36         ` Miaohe Lin
2026-02-04  7:33 ` [PATCH v3 2/3] selftests/mm: add memory failure clean pagecache test Miaohe Lin
2026-02-04  7:33 ` [PATCH v3 3/3] selftests/mm: add memory failure dirty " Miaohe Lin

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