linux-yocto/tools
Feng Tang 62798e3291 selftests/mm: compaction_test: support platform with huge mount of memory
commit ab00ddd802f80e31fc9639c652d736fe3913feae upstream.

When running mm selftest to verify mm patches, 'compaction_test' case
failed on an x86 server with 1TB memory.  And the root cause is that it
has too much free memory than what the test supports.

The test case tries to allocate 100000 huge pages, which is about 200 GB
for that x86 server, and when it succeeds, it expects it's large than 1/3
of 80% of the free memory in system.  This logic only works for platform
with 750 GB ( 200 / (1/3) / 80% ) or less free memory, and may raise false
alarm for others.

Fix it by changing the fixed page number to self-adjustable number
according to the real number of free memory.

Link: https://lkml.kernel.org/r/20250423103645.2758-1-feng.tang@linux.alibaba.com
Fixes: bd67d5c15c ("Test compaction of mlocked memory")
Signed-off-by: Feng Tang <feng.tang@linux.alibaba.com>
Acked-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Tested-by: Baolin Wang <baolin.wang@inux.alibaba.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Sri Jayaramappa <sjayaram@akamai.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-22 14:12:25 +02:00
..
accounting
arch tools/x86/kcpuid: Protect against faulty "max subleaf" values 2024-10-10 11:57:29 +02:00
bootconfig tools/bootconfig: Fix the wrong format specifier 2025-02-08 09:52:28 +01:00
bpf bpf: bpftool: Setting error code in do_loader() 2025-05-02 07:50:53 +02:00
build perf cs-etm: Bump minimum OpenCSD version to ensure a bugfix is present 2024-02-05 20:14:31 +00:00
certs
cgroup
counter
crypto/ccp crypto: ccp - Fix some unfused tests 2023-11-20 11:59:18 +01:00
debugging
edid
firewire
firmware
gpio
hv tools: hv: change permissions of NetworkManager configuration file 2024-12-27 13:58:46 +01:00
iio tools/iio: Add memory allocation failure check for trigger_name 2024-10-17 15:24:20 +02:00
include memblock tests: fix implicit declaration of function 'numa_valid_node' 2025-01-17 13:36:14 +01:00
kvm/kvm_stat
laptop
leds
lib libbpf: Fix hypothetical STT_SECTION extern NULL deref case 2025-04-10 14:37:30 +02:00
memory-model tools/memory-model: Fix bug in lock.cat 2024-08-03 08:54:21 +02:00
mm tools/mm: fix compile error 2024-11-22 15:38:33 +01:00
net/ynl tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing 2025-05-22 14:12:16 +02:00
objtool objtool: Ignore end-of-section jumps for KCOV/GCOV 2025-05-02 07:51:04 +02:00
pci
pcmcia
perf perf tools: annotate asm_pure_loop.S 2025-04-10 14:37:35 +02:00
power pm: cpupower: bench: Prevent NULL dereference on malloc failure 2025-04-25 10:45:10 +02:00
rcu
scripts tools: Override makefile ARCH variable if defined, but empty 2024-12-14 19:59:49 +01:00
spi
testing selftests/mm: compaction_test: support platform with huge mount of memory 2025-05-22 14:12:25 +02:00
thermal
time
tracing rtla/timerlat_top: Set OSNOISE_WORKLOAD for kernel threads 2025-03-07 16:45:49 +01:00
usb usbip: tools: Fix detach_port() invalid port error path 2024-11-08 16:28:22 +01:00
verification verification/dot2: Improve dot parser robustness 2024-12-14 20:00:13 +01:00
virtio tools/virtio: Add dma sync api for virtio test 2023-10-16 05:32:23 -04:00
wmi
workqueue
Makefile