Re: [PATCH v5 6/7] selftests: prctl: introduce tests for disabling THPs completely

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 05, 2025 at 01:55:53PM -0400, Zi Yan wrote:
> On 5 Sep 2025, at 13:43, Mark Brown wrote:

> > 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.

> prctl_thp_disable.c uses “#include <sys/mman.h>” but asm-generic/mman-common.h
> is included in asm/mman.h. And sys/mman.h gets MADV_COLLAPSE from
> bits/mman-linux.h. Maybe that is why?

Ah, of course - if glibc is reproducing the kernel definitions rather
than including the kernel headers to get them then that'd do it.
Probably the test needs to locally define the new MADV_COLLAPSE for
glibc compatibility, IME trying to directly include the kernel headers
when glibc doesn't normally use them tends to blow up on you sooner or
later.

I knew it'd be something simple, thanks.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux