]> www.infradead.org Git - users/willy/xarray.git/commit
selftest/mm: test enable_soft_offline behaviors
authorJiaqi Yan <jiaqiyan@google.com>
Wed, 26 Jun 2024 05:08:17 +0000 (05:08 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 5 Jul 2024 01:06:00 +0000 (18:06 -0700)
commit72ead83dad5c9f7a3ac00d4ee5f92a0794836bb1
tree412d139cb030ca15e4f5f951f319acb80ef620a3
parent56374430c5dfcf6d4f1df79514f797b45fbd0485
selftest/mm: test enable_soft_offline behaviors

Add regression and new tests when hugepage has correctable memory errors,
and how userspace wants to deal with it:

* if enable_soft_offline=1, mapped hugepage is soft offlined
* if enable_soft_offline=0, mapped hugepage is intact

Free hugepages case is not explicitly covered by the tests.

Hugepage having corrected memory errors is emulated with
MADV_SOFT_OFFLINE.

[jiaqiyan@google.com: v7]
Link: https://lkml.kernel.org/r/20240628205958.2845610-4-jiaqiyan@google.com
Link: https://lkml.kernel.org/r/20240626050818.2277273-4-jiaqiyan@google.com
Signed-off-by: Jiaqi Yan <jiaqiyan@google.com>
Acked-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Frank van der Linden <fvdl@google.com>
Cc: Jane Chu <jane.chu@oracle.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Lance Yang <ioworker0@gmail.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/.gitignore
tools/testing/selftests/mm/Makefile
tools/testing/selftests/mm/hugetlb-soft-offline.c [new file with mode: 0644]
tools/testing/selftests/mm/run_vmtests.sh