Re: [GIT PULL] Memory folios for v5.15

From
Nicholas Piggin <npiggin@gmail.com>
Date
2021-08-26 04:02:22
Also in
linux-fsdevel, lkml
Reply to
Christoph Hellwig, 2021-08-25
Excerpts from Christoph Hellwig's message of August 25, 2021 4:32 pm:
On Tue, Aug 24, 2021 at 03:44:48PM -0400, Theodore Ts'o wrote:
quoted
The problem is whether we use struct head_page, or folio, or mempages,
we're going to be subsystem users' faces.  And people who are using it
every day will eventually get used to anything, whether it's "folio"
or "xmoqax", we sould give a thought to newcomers to Linux file system
code.  If they see things like "read_folio()", they are going to be
far more confused than "read_pages()" or "read_mempages()".
Are they?  It's not like page isn't some randomly made up term
as well, just one that had a lot more time to spread.
quoted
So if someone sees "kmem_cache_alloc()", they can probably make a
guess what it means, and it's memorable once they learn it.
Similarly, something like "head_page", or "mempages" is going to a bit
more obvious to a kernel newbie.  So if we can make a tiny gesture
towards comprehensibility, it would be good to do so while it's still
easier to change the name.
All this sounds really weird to me.  I doubt there is any name that
nicely explains "structure used to manage arbitrary power of two
units of memory in the kernel" very well.
Cluster is easily understandable to a filesystem developer as contiguous 
set of one or more, probably aligned and sized to power of 2.  Swap 
subsystem in mm uses it (maybe because it's disk adjacent, but it does 
have page clusters) so mm developers would be fine with it too. Sadly
you might have to call it page_cluster to avoid confusion with block 
clusters in fs then it gets a bit long.

Superpage could be different enough from huge page that implies one page 
of a particular large size (even though some other OS might use it for 
that), but a super set of pages, which could be 1 or more.

Thanks,
Nick
Thread (161 messages) 161 messages, 27 authors, last reply 2021-10-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help