linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM/BPF TOPIC] Non-lru page migration in a memdesc world
@ 2025-01-07 16:11 David Hildenbrand
  2025-01-07 16:48 ` Zi Yan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: David Hildenbrand @ 2025-01-07 16:11 UTC (permalink / raw)
  To: linux-mm; +Cc: lsf-pc

Hi,

one item on my todo list is making PageOffline pages to stop using 
"struct page" members except page->type and 1/2 flags, to prepare them 
for the memdesc future, to avoid unnecessary atomics, and to resolve 
some (so-far) theoretical issues with temporary speculative references.

For example, the page->_refcount will always be 0 (frozen) for 
PageOffline pages, and they will get allocated/freed similar to how we 
allocate/free frozen pages for slab already. Once we move the refcount 
into "struct folio", they will not have a refcount at all anymore.

One complication is balloon compaction: we allow for migrating 
PageOffline pages allocated in some memory ballooning implementations 
such as virtio-balloon.

For that, we use the "non-lru page migration" framework and in that 
process we make use of ... way to many members of "struct page"/"struct 
folio" and rely on the refcount not being 0. For example, we certainly 
don't want to allocate memdescs for PageOffline pages just so some of 
them can be migrated.

While we converted non-lru page migration to work on folios (i.e., 
folio_movable_ops()) these things are not actually "folios" in the 
future, they can have different memdescs.

So, how can we migrate non-lru things that are not folios while not 
relying on "struct folio" members, with minimal/no metadata overhead?

I have some ideas, but no complete solution yet; input about the 
requirements of other non-lru page migration use cases besides 
PageOffline will be interesting.

... and maybe, we have other non-folio things we'd want to migrate, and 
want to be prepared to handle them as well? (hint: leaf page tables?)

-- 
Cheers,

David / dhildenb



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

end of thread, other threads:[~2025-03-24 18:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-07 16:11 [LSF/MM/BPF TOPIC] Non-lru page migration in a memdesc world David Hildenbrand
2025-01-07 16:48 ` Zi Yan
2025-01-07 16:55   ` David Hildenbrand
2025-01-07 17:27     ` Zi Yan
2025-01-13  4:18       ` Alistair Popple
2025-01-13  4:56         ` Matthew Wilcox
2025-01-07 16:49 ` Matthew Wilcox
2025-01-08  3:39   ` Zi Yan
2025-03-24 18:56 ` David Hildenbrand

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