linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] New selftest for mm
@ 2023-10-05 16:39 Breno Leitao
  2023-10-05 16:39 ` [PATCH v2 1/2] selftests/mm: export get_free_hugepages() Breno Leitao
  2023-10-05 16:39 ` [PATCH v2 2/2] selftests/mm: Add a new test for madv and hugetlb Breno Leitao
  0 siblings, 2 replies; 9+ messages in thread
From: Breno Leitao @ 2023-10-05 16:39 UTC (permalink / raw)
  To: mike.kravetz, muchun.song, akpm; +Cc: linux-mm, riel

This is a simple test case that reproduces an mm problem[1], where a page
fault races with madvise(), and it is not trivial to reproduce and
debug.

This test-case aims to avoid such race problems from happening again,
impacting workloads that leverages external allocators, such as
tcmalloc, jemalloc, etc.

Changelog:
---------

V2:
 * Remove some unnecessary checks
 * Skip the test instead of failing in some cases

[1] https://lore.kernel.org/all/20231001005659.2185316-1-riel@surriel.com/#r

Breno Leitao (2):
  selftests/mm: export get_free_hugepages()
  selftests/mm: Add a new test for madv and hugetlb

 tools/testing/selftests/mm/Makefile           |  1 +
 tools/testing/selftests/mm/hugetlb-madvise.c  | 19 -----
 .../selftests/mm/hugetlb_fault_after_madv.c   | 73 +++++++++++++++++++
 tools/testing/selftests/mm/run_vmtests.sh     |  4 +
 tools/testing/selftests/mm/vm_util.c          | 19 +++++
 tools/testing/selftests/mm/vm_util.h          |  1 +
 6 files changed, 98 insertions(+), 19 deletions(-)
 create mode 100644 tools/testing/selftests/mm/hugetlb_fault_after_madv.c

-- 
2.34.1



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

end of thread, other threads:[~2023-11-03 14:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-05 16:39 [PATCH v2 0/2] New selftest for mm Breno Leitao
2023-10-05 16:39 ` [PATCH v2 1/2] selftests/mm: export get_free_hugepages() Breno Leitao
2023-10-06  3:54   ` Rik van Riel
2023-10-05 16:39 ` [PATCH v2 2/2] selftests/mm: Add a new test for madv and hugetlb Breno Leitao
2023-10-06  3:55   ` Rik van Riel
2023-11-02 12:24   ` Ryan Roberts
2023-11-02 12:29     ` Ryan Roberts
2023-11-03 13:59       ` Breno Leitao
2023-11-03 14:47         ` Ryan Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).