linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM/BPF TOPIC] Mapping text with large folios
@ 2025-03-19 15:38 Ryan Roberts
  2025-03-19 18:16 ` Yang Shi
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Ryan Roberts @ 2025-03-19 15:38 UTC (permalink / raw)
  To: lsf-pc, Linux-MM; +Cc: Matthew Wilcox, Dave Chinner, Barry Song

Hi All,

I know this is very last minute, but I was hoping that it might be possible to
squeeze in a session to discuss the following?

Summary/Background:

On arm64, physically contiguous and naturally aligned regions can take advantage
of contpte mappings (e.g. 64 KB) to reduce iTLB pressure. However, for file
regions containing text, current readahead behaviour often yields small,
misaligned folios, preventing this optimization. This proposal introduces a
special-case path for executable mappings, performing synchronous reads of an
architecture-chosen size into large folios (64 KB on arm64). Early performance
tests on real-world workloads (e.g. nginx, redis, kernel compilation) show ~2-9%
gains.

I’ve previously posted attempts to enable this performance improvement ([1],
[2]), but there were objections and conversation fizzled out. Now that I have
more compelling performance data, I’m hoping there is now stronger
justification, and we can find a path forwards.

What I’d Like to Cover:

 - Describe how text memory should ideally be mapped and why it benefits
   performance.

 - Brief review of performance data.

 - Discuss options for the best way to encourage text into large folios:
     - Let the architecture request a preferred size
     - Extend VMA attributes to include preferred THP size hint
     - Provide a sysfs knob
     - Plug into the “mapping min folio order” infrastructure
     - Other approaches?

[1] https://lore.kernel.org/all/20240215154059.2863126-1-ryan.roberts@arm.com/
[2] https://lore.kernel.org/all/20240717071257.4141363-1-ryan.roberts@arm.com/

Thanks,
Ryan


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

end of thread, other threads:[~2025-04-01 11:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-19 15:38 [LSF/MM/BPF TOPIC] Mapping text with large folios Ryan Roberts
2025-03-19 18:16 ` Yang Shi
2025-03-19 20:38   ` Dave Chinner
2025-03-19 22:13     ` Barry Song
2025-03-20  0:53       ` Dave Chinner
2025-03-20 14:47         ` Ryan Roberts
2025-03-20 12:16       ` Ryan Roberts
2025-03-20 12:13     ` Ryan Roberts
2025-03-19 20:47 ` Barry Song
2025-03-20 14:57   ` Ryan Roberts
2025-03-30  4:46     ` Barry Song
2025-04-01 11:09       ` Ryan Roberts
2025-04-01 10:53 ` Ryan Roberts

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