[LTP] [PATCH v3 3/3] hugemmap34: Test to detect bug with migrating gigantic pages

Petr Vorel pvorel@suse.cz
Fri Feb 16 13:01:20 CET 2024


Hi Li,

FYI hugemmap34 fails on x86_64 and s390x various SLES kernels (tested: x86_64
from 4.4 to 6.4, s390x from 4.12. to 6.4):

tst_test.c:1627: TINFO: Timeout per run is 0h 01m 30s
hugemmap34.c:85: TBROK: mmap() failed: EINVAL (22)

Removing MAP_HUGE_1GB shows TBROK due ENOMEM.
I suppose low memory resource for this VM.
=> Maybe we need .min_mem_avail = 1024?

+ define the value and reuse also here (so that we don't forget to update on
other place if later changed):
 hugetlbsize = 1 * 1024 * 1024 * 1024u;
(also remove '1 *')

Although you do #include <linux/mman.h>, for some reason I get some failures on
aarch64 and s390x on old gcc 4.8.5:

hugemmap34.c:82:39: error: ‘MAP_HUGE_1GB’ undeclared (first use in this function)
      MAP_PRIVATE|MAP_ANON|MAP_HUGETLB|MAP_HUGE_1GB,
                                       ^
But works on the same toolchain with gcc 7.5.0, also x86_64 and ppc64le works
fine on them).  It looks to me MAP_HUGE_1GB will need to be backported to lapi.
It works on x86_64 and ppc64le.

Kind regards,
Petr


More information about the ltp mailing list