Sharing memory for shared file extents
Sharing memory for shared file extents
Posted May 25, 2022 13:37 UTC (Wed) by willy (subscriber, #9762)Parent article: Sharing memory for shared file extents
> Right now, you can simply cast a folio pointer to a page pointer and vice versa; "it's a bad code smell, but it works". The page structure has a pointer in disguise called "memdesc" that points to a folio structure.
I think I went a little fast there ;-)
Today, struct folio and struct page share the same memory. In The Glorious Future, struct folio will come from kmalloc() and struct page will be reduced to a single pointer with a type encoded in the bottom few bits (folio, slab, page table, etc, etc). That's what I was calling the memdesc.
Thanks for the write-up!
