[PATCH 5/5] mm: Do not map the shadow stack as THP
Mark Brown
broonie at kernel.org
Wed Feb 25 05:02:36 PST 2026
On Tue, Feb 24, 2026 at 05:57:57PM +0000, Catalin Marinas wrote:
> The default shadow stack size allocated on first prctl() for the main
> thread or subsequently on clone() is either half of RLIMIT_STACK or half
> of a thread's stack size (for arm64). Both of these are likely to be
> suitable for a THP allocation and the kernel is more aggressive in
> creating such mappings. However, it does not make much sense to use a
> huge page. It didn't make sense for the normal stacks either, see commit
> c4608d1bf7c6 ("mm: mmap: map MAP_STACK to VM_NOHUGEPAGE").
Reviewed-by: Mark Brown <broonie at kernel.org>
The create THP and immediately splitting it pattern is very clear when
checking the mm behaviour on new GCSs, this should help performance.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260225/fbd91782/attachment.sig>
More information about the linux-arm-kernel
mailing list