Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] restore large page mappings in direct map for secretmem
@ 2026-06-03 10:46 Lance Yang
  2026-06-03 10:46 ` [RFC PATCH 1/2] mm/secretmem: try to restore large page mappings in direct map Lance Yang
  2026-06-03 10:46 ` [RFC PATCH 2/2] x86/mm: restore large page mappings for secretmem Lance Yang
  0 siblings, 2 replies; 8+ messages in thread
From: Lance Yang @ 2026-06-03 10:46 UTC (permalink / raw)
  To: akpm
  Cc: rppt, david, tglx, mingo, bp, dave.hansen, x86, hpa, luto, peterz,
	linux-mm, linux-kernel, xueyuan.chen21, ioworker0

Hi all,

secretmem removes the pages backing secretmem mappings from the direct map.

Removing one base page from the direct map can split the covering large
mapping down to PTE mappings. Repeated splits can leave more of the direct
map mapped with PTEs, meaning more TLB entries for the same range and
potentially more TLB pressure.

This series adds an arch hook so secretmem can ask the architecture to try
to restore large page mappings whenever secretmem restores a folio to the
direct map.

Thanks,
Lance

Lance Yang (2):
  mm/secretmem: try to restore large page mappings in direct map
  x86/mm: restore large page mappings for secretmem

 arch/x86/include/asm/set_memory.h |  2 ++
 arch/x86/mm/pat/set_memory.c      | 27 +++++++++++++++++++++++++++
 include/linux/set_memory.h        |  6 ++++++
 mm/secretmem.c                    | 12 ++++++++++--
 4 files changed, 45 insertions(+), 2 deletions(-)

-- 
2.49.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-06-03 15:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 10:46 [RFC PATCH 0/2] restore large page mappings in direct map for secretmem Lance Yang
2026-06-03 10:46 ` [RFC PATCH 1/2] mm/secretmem: try to restore large page mappings in direct map Lance Yang
2026-06-03 10:59   ` Mike Rapoport
2026-06-03 11:41     ` Lance Yang
2026-06-03 12:35       ` Mike Rapoport
2026-06-03 13:09         ` Lance Yang
2026-06-03 15:48           ` David Hildenbrand (Arm)
2026-06-03 10:46 ` [RFC PATCH 2/2] x86/mm: restore large page mappings for secretmem Lance Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox