[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c8249725-e91d-4c51-b9bb-40305e61e20d@sirena.org.uk>
Date: Fri, 5 Sep 2025 18:43:53 +0100
From: Mark Brown <broonie@...nel.org>
To: Usama Arif <usamaarif642@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, david@...hat.com,
linux-mm@...ck.org, linux-fsdevel@...r.kernel.org, corbet@....net,
rppt@...nel.org, surenb@...gle.com, mhocko@...e.com,
hannes@...xchg.org, baohua@...nel.org, shakeel.butt@...ux.dev,
riel@...riel.com, ziy@...dia.com, laoar.shao@...il.com,
dev.jain@....com, baolin.wang@...ux.alibaba.com, npache@...hat.com,
lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com,
ryan.roberts@....com, vbabka@...e.cz, jannh@...gle.com,
Arnd Bergmann <arnd@...db.de>, sj@...nel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
kernel-team@...a.com, Aishwarya.TCV@....com
Subject: Re: [PATCH v5 6/7] selftests: prctl: introduce tests for disabling
THPs completely
On Fri, Aug 15, 2025 at 02:54:58PM +0100, Usama Arif wrote:
> The test will set the global system THP setting to never, madvise
> or always depending on the fixture variant and the 2M setting to
> inherit before it starts (and reset to original at teardown).
> The fixture setup will also test if PR_SET_THP_DISABLE prctl call can
> be made to disable all THPs and skip if it fails.
I don't think this is an issue in this patch but with it we're seeing
build failures in -next on arm64 with:
make KBUILD_BUILD_USER=KernelCI FORMAT=.xz ARCH=arm64 HOSTCC=gcc CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- CC="ccache aarch64-linux-gnu-gcc" O=/tmp/kci/linux/build -C/tmp/kci/linux -j98 kselftest-gen_tar
...
CC prctl_thp_disable
prctl_thp_disable.c: In function ‘test_mmap_thp’:
prctl_thp_disable.c:64:39: error: ‘MADV_COLLAPSE’ undeclared (first use in this function); did you mean ‘MADV_COLD’?
64 | madvise(mem, pmdsize, MADV_COLLAPSE);
| ^~~~~~~~~~~~~
| MADV_COLD
since the headers_install copy of asm-generic/mman-common.h doesn't
appear to being picked up with the above build invocation (most others
are fine). I'm not clear why, it looks like an appropriate -isystem
ends up getting passed to the compiler:
aarch64-linux-gnu-gcc -Wall -O2 -I /linux/tools/testing/selftests/../../.. -isystem /tmp/kci/linux/build/usr/include -isystem /linux/tools/testing/selftests/../../../tools/include/uapi -U_FORTIFY_SOURCE -D_GNU_SOURCE= prctl_thp_disable.c vm_util.c thp_settings.c -lrt -lpthread -lm -o /tmp/kci/linux/build/kselftest/mm/prctl_thp_disable
but the header there is getting ignored AFAICT. Probably the problem is
fairly obvious and I'm just being slow - I'm not quite 100% at the
minute.
Thanks to Aishwarya for confirming which patch triggered the issue.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists