linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM/BPF TOPIC] Flexible orders for anonymous folios
@ 2023-02-22 23:55 Yu Zhao
  2023-02-23  0:16 ` Suren Baghdasaryan
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Yu Zhao @ 2023-02-22 23:55 UTC (permalink / raw)
  To: lsf-pc
  Cc: Linux-MM, Yang Shi, Matthew Wilcox, Yin, Fengwei, Hugh Dickins,
	Kirill A . Shutemov

Currently anonymous folios only support two orders: 0 and the PMD
order. Flexible orders for anonymous folios can resist both internal
or external fragmentations when the PMD order is too underutilized or
costly to allocate. Flexible orders can also leverage the TLB
coalescing feature, .e.g., order 3 for AMD and order 4 for ARM CPUs.

Discussion points:
1. The page fault path: determining the best order and the fallback policy.
2. The reclaim path: detecting the utilization and the splitting policy.
3. The refcount and the mapcount models, e.g., reuse the PMD-mapped
THP model or not.
4. The splitting, and the collapsing if needed.
5. Other paths: COW, GUP, madvise(), mprotect(), page migration, etc.

A bit of history:
I discussed this topic at Matthew's THP Cabal meeting a couple of
years ago, as one of the major use cases of folios. Around the same
time, I tried to get Hugh to work with me on it, since he tried
something similar back in 2001 [1]. William's page clustering from
2003 [2] is also based on that, btw. Then I put the idea on the back
burner.

Now it seems to be a good time to revisit. Yang Shi and I have been
looking at some details, trying to scope out the work that would be
required. We don't have anything definitive yet, but we should have
enough to share by the time of the LSF/MM/BPF.

[1] https://lore.kernel.org/linux-mm/Pine.LNX.4.21.0107051737340.1577-100000@localhost.localdomain/
[2] https://lwn.net/Articles/23785/


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

end of thread, other threads:[~2023-03-06 20:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22 23:55 [LSF/MM/BPF TOPIC] Flexible orders for anonymous folios Yu Zhao
2023-02-23  0:16 ` Suren Baghdasaryan
2023-02-23  4:01 ` Matthew Wilcox
2023-02-23  4:45   ` Yin, Fengwei
2023-02-23 18:07   ` Yang Shi
2023-03-01 10:35   ` Ryan Roberts
2023-03-06 20:57   ` Zi Yan
2023-02-24 20:34 ` Jason Gunthorpe
2023-02-26  1:30 ` Hillf Danton
2023-02-26  2:34   ` Matthew Wilcox
2023-02-26  4:12     ` Hillf Danton
2023-02-27  0:58       ` Hillf Danton
2023-03-01 23:29 ` Chris Li
2023-03-02  4:05 ` Yu Zhao

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