linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@kernel.org>,
	Deepak Gupta <debug@rivosinc.com>,
	Rick Edgecombe <rick.p.edgecombe@intel.com>,
	Will Deacon <will@kernel.org>, Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	linux-mm@kvack.org
Subject: Re: [PATCH 5/5] mm: Do not map the shadow stack as THP
Date: Wed, 25 Feb 2026 16:10:18 +0000	[thread overview]
Message-ID: <a44708a8-ec02-41fa-b870-a649f13072f4@sirena.org.uk> (raw)
In-Reply-To: <aZ8aeHpn_KElP2jm@arm.com>

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

On Wed, Feb 25, 2026 at 03:51:20PM +0000, Catalin Marinas wrote:
> On Wed, Feb 25, 2026 at 01:02:36PM +0000, Mark Brown wrote:

> > The create THP and immediately splitting it pattern is very clear when
> > checking the mm behaviour on new GCSs, this should help performance.

> If the first access is a write, the kernel allocates a THP from the
> start without subsequent splitting. Also since 6.13 (commit 1ced09e0331f

Ah, it seems this has been optimised since I looked in detail - it was
something I was aware of as needing some work.

> "mm: allocate THP on hugezeropage wp-fault"), we go for another THP on
> write. It's still wasting memory and time to zero the full 2MB when
> it's highly unlikely we'd ever use that much for a shadow stack.

Yeah, for a shadow stack I'd be surprised if it wasn't cheaper to split
than do all that.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-02-25 16:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 17:57 [PATCH 0/5] mm: arch/shstk: Common shadow stack mapping helper and VM_NOHUGEPAGE Catalin Marinas
2026-02-24 17:57 ` [PATCH 1/5] mm: Introduce vm_mmap_shadow_stack() as a helper for VM_SHADOW_STACK mappings Catalin Marinas
2026-02-24 19:47   ` Edgecombe, Rick P
2026-02-25 12:25   ` Mark Brown
2026-02-25 13:32   ` David Hildenbrand (Arm)
2026-02-24 17:57 ` [PATCH 2/5] arm64: gcs: Use the new common vm_mmap_shadow_stack() helper Catalin Marinas
2026-02-25 13:32   ` David Hildenbrand (Arm)
2026-02-25 13:41   ` Mark Brown
2026-02-24 17:57 ` [PATCH 3/5] riscv: shstk: " Catalin Marinas
2026-02-25 13:33   ` David Hildenbrand (Arm)
2026-02-24 17:57 ` [PATCH 4/5] x86: " Catalin Marinas
2026-02-24 19:47   ` Edgecombe, Rick P
2026-02-25  8:12     ` Catalin Marinas
2026-02-25 13:33   ` David Hildenbrand (Arm)
2026-02-24 17:57 ` [PATCH 5/5] mm: Do not map the shadow stack as THP Catalin Marinas
2026-02-25 13:02   ` Mark Brown
2026-02-25 15:51     ` Catalin Marinas
2026-02-25 16:10       ` Mark Brown [this message]
2026-02-25 13:34   ` David Hildenbrand (Arm)
2026-02-25  0:06 ` [PATCH 0/5] mm: arch/shstk: Common shadow stack mapping helper and VM_NOHUGEPAGE Deepak Gupta
2026-02-25  8:08   ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a44708a8-ec02-41fa-b870-a649f13072f4@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@kernel.org \
    --cc=debug@rivosinc.com \
    --cc=hpa@zytor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mingo@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=rick.p.edgecombe@intel.com \
    --cc=tglx@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox