twx-linux/tools/testing/selftests
Dev Jain 536ab838a5 selftests/mm: relax test to fail after 100 migration failures
It was recently observed at [1] that during the folio unmapping stage of
migration, when the PTEs are cleared, a racing thread faulting on that
folio may increase the refcount of the folio, sleep on the folio lock (the
migration path has the lock), and migration ultimately fails when
asserting the actual refcount against the expected.  Thereby, the
migration selftest fails on shared-anon mappings.  The above enforces the
fact that migration is a best-effort service, therefore, it is wrong to
fail the test for just a single failure; hence, fail the test after 100
consecutive failures (where 100 is still a subjective choice).  Note that,
this has no effect on the execution time of the test since that is
controlled by a timeout.

[1] https://lore.kernel.org/all/20240801081657.1386743-1-dev.jain@arm.com/

Link: https://lkml.kernel.org/r/20240830051609.4037834-1-dev.jain@arm.com
Signed-off-by: Dev Jain <dev.jain@arm.com>
Suggested-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Tested-by: Ryan Roberts <ryan.roberts@arm.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@kernel.org>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoph Lameter <cl@gentwo.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Gavin Shan <gshan@redhat.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Lance Yang <ioworker0@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Cc: Yang Shi <yang@os.amperecomputing.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-09-09 16:39:05 -07:00
..
alsa kselftest/alsa: Log the PCM ID in pcm-test 2024-07-18 16:48:44 +02:00
amd-pstate
arm64 kselftest: missing arg in ptrace.c 2024-07-23 15:27:16 +01:00
bpf selftests/bpf: Add a test to verify previous stacksafe() fix 2024-08-12 18:15:33 -07:00
breakpoints selftests/breakpoints:Remove unused variable 2024-07-11 11:23:55 -06:00
cachestat selftests: cachestat: Fix build warnings on ppc64 2024-05-29 12:24:44 -06:00
capabilities selftests/capabilities: fix warn_unused_result build warnings 2024-05-08 16:48:25 -06:00
cgroup selftests: test_zswap: add test for hierarchical zswap.writeback 2024-09-03 21:15:47 -07:00
clone3 selftests/clone3: ksft_exit functions do not return 2024-05-06 13:57:20 -06:00
connector
core fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE 2024-08-05 19:23:11 -04:00
cpu-hotplug
cpufreq selftests: cpufreq: conform test to TAP 2024-05-06 13:57:20 -06:00
damon selftests/damon: add execute permissions to test scripts 2024-09-03 21:15:57 -07:00
devices kselftest: devices: Add test to detect device error logs 2024-07-12 10:59:06 +02:00
dma selftests/dma:remove unused variable 2024-07-11 11:23:55 -06:00
dmabuf-heaps kselftests: dmabuf-heaps: Ensure the driver name is null-terminated 2024-07-29 09:02:54 +02:00
drivers selftests: mlxsw: ethtool_lanes: Source ethtool lib from correct path 2024-08-21 17:20:09 -07:00
dt linux_kselftest-next-6.9-rc1 2024-03-11 09:25:33 -07:00
efivarfs
exec - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
fchmodat2 selftests/fchmodat2: fix clang build failure due to -static-libasan 2024-06-11 15:05:05 -06:00
filelock
filesystems - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
firmware
fpu
ftrace ftrace: Rewrite of function graph tracer 2024-07-18 13:36:33 -07:00
futex selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
gpio selftest: gpio: remove obsolete gpio-mockup test 2024-03-05 20:01:08 +01:00
hid selftests/hid: add test for attaching multiple time the same struct_ops 2024-07-24 18:27:22 +02:00
ia64
intel_pstate selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
iommu iommufd: Do not allow creating areas without READ or WRITE 2024-08-26 09:16:13 +02:00
ipc selftests/ipc: ksft_exit functions do not return 2024-05-06 13:57:20 -06:00
ir
kcmp selftests/kcmp: remove unused open mode 2024-05-11 15:51:43 -07:00
kexec
kmod
kselftest selftests: ksft: Fix finished() helper exit code on skipped tests 2024-07-31 11:38:56 -06:00
kvm KVM: selftests: Add a testcase to verify x2APIC is fully readonly 2024-08-13 12:01:46 -04:00
landlock selftests/landlock: Add cred_transfer test 2024-07-24 17:34:56 +02:00
lib
livepatch selftests/livepatch: wait for atomic replace to occur 2024-08-26 14:52:25 +02:00
lkdtm lkdtm/bugs: add test for hung smp_call_function_single() 2024-06-17 11:17:31 -07:00
locking
lsm lsm: use 32-bit compatible data types in LSM syscalls 2024-03-14 11:31:26 -04:00
media_tests
membarrier selftests: membarrier: ksft_exit_pass() does not return 2024-05-06 13:57:20 -06:00
memfd selftests/memfd: fix spelling mistakes 2024-05-07 10:36:59 -07:00
memory-hotplug
mincore
mm selftests/mm: relax test to fail after 100 migration failures 2024-09-09 16:39:05 -07:00
mount
mount_setattr
move_mount_set_group
mqueue selftests/mqueue: fix 5 warnings about signed/unsigned mismatches 2024-06-24 22:25:03 -07:00
nci
net selftests: mptcp: join: check re-re-adding ID 0 signal 2024-08-29 10:39:50 +02:00
nolibc tools/nolibc: implement strerror() 2024-06-29 09:44:57 +02:00
nsfs
ntb
openat2 selftests/openat2: fix clang build failures: -static-libasan, LOCAL_HDRS 2024-06-11 15:00:11 -06:00
perf_events selftests/perf_events: Test FASYNC with watermark wakeups 2024-04-14 22:26:33 +02:00
pid_namespace
pidfd pidfs: add selftests for new namespace ioctls 2024-07-24 10:53:13 +02:00
power_supply selftests: power_supply: Make it POSIX-compliant 2024-05-06 13:57:20 -06:00
powerpc selftests/powerpc: Fix build with USERCFLAGS set 2024-07-06 22:10:14 +10:00
prctl
proc - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
pstore
ptp
ptrace
rcutorture torture: Scale --do-kvfree test time 2024-04-16 11:16:36 +02:00
resctrl - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
ring-buffer selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
riscv - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
rlimits
rseq
rtc
rust kselftest: Add basic test for probing the rust sample modules 2024-03-04 13:13:04 -07:00
safesetid
sched selftests/sched: fix code format issues 2024-07-11 11:23:53 -06:00
seccomp minmax: make generic MIN() and MAX() macros available everywhere 2024-07-28 15:49:18 -07:00
sgx selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
sigaltstack selftests/sigaltstack: Fix ppc64 GCC build 2024-07-01 21:35:38 +10:00
size
sparc64
splice
static_keys
sync selftests: sync: ksft_exit_pass() does not return 2024-05-06 13:57:21 -06:00
syscall_user_dispatch selftests: sud_test: return correct emulated syscall value on RISC-V 2024-04-25 09:46:41 -07:00
sysctl
tc-testing tc-testing: don't access non-existent variable on exception 2024-08-16 18:02:51 -07:00
tdx
thermal/intel selftests: thermal: intel: workload_hint: add missing gitignore 2024-02-20 16:30:55 -07:00
timens selftest/timerns: fix clang build failures for abs() calls 2024-07-05 13:21:48 -06:00
timers selftests/timers: remove unused irqcount variable 2024-07-11 11:23:54 -06:00
tmpfs selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
tpm2
tty kselftest/tty: Report a consistent test name for the one test we run 2024-05-06 13:57:19 -06:00
turbostat tools/power turbostat: Add selftests for added perf counters 2024-07-26 13:51:25 -04:00
uevent selftests: uevent: add missing gitignore 2024-02-20 16:30:40 -07:00
user
user_events selftests/user_events: Add non-spacing separator check 2024-05-13 12:15:46 -04:00
vDSO selftests/vDSO: add tests for vgetrandom 2024-07-19 20:22:12 +02:00
watchdog
wireguard wireguard: selftests: use acpi=off instead of -no-acpi for recent QEMU 2024-07-05 17:21:10 -07:00
x86 Probes updates for v6.11: 2024-07-18 12:19:20 -07:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_deps.sh selftests: kselftest_deps: fix l5_test() empty variable 2024-05-08 16:46:41 -06:00
kselftest_harness.h selftests/harness: Fix tests timeout and race condition 2024-06-28 16:06:03 +02:00
kselftest_install.sh
kselftest_module.h
kselftest.h selftests: kselftest: also use strerror() on nolibc 2024-06-29 09:44:58 +02:00
lib.mk - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
Makefile USB/Thunderbolt updates for 6.11-rc1 2024-07-19 15:37:48 -07:00
run_kselftest.sh