All of lore.kernel.org
 help / color / mirror / Atom feed
* Is it possible to force an address_space to always allocate pages in specific order?
@ 2022-09-14  6:17 Qu Wenruo
  2022-09-14 22:23 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Qu Wenruo @ 2022-09-14  6:17 UTC (permalink / raw)
  To: Linux Memory Management List; +Cc: linux-btrfs, Matthew Wilcox

Hi,

With recent folio MM changes, I'm wondering if it's possible to force an
address space to always allocate a folio in certain order?

E.g. For certain inode, we always allocate pages (folios) in the order
of 2 for its page cache.

I'm asking this seemingly weird question for the following reasons:

- Support multi-page blocksize of various filesystems
   Currently most file systems only go support sub-page, not multi-page
   blocksize.

   Thus if there is forced order for all the address space, it would be
   much easier to implement multi-page blocksize support.
   (Although I strongly doubt if we need such multi-page blocksize
    support for most fses)

- For btrfs metadata optimization
   Btrfs metadata is always using multiple blocks (and power of 2 of
   cource) for one of its metadata block.

   Currently we have to do a lot of cross-page handling, if we can ensure
   all of our metadata block are using folios, we can get rid of such
   cross-page checks (at a cost of possible higher chance hitting
   ENOMEM).

It looks like our current __filemap_get_folio() is still allocating new
folios using fixed order 0, thus it's not really possible for now.

Would it be possible in the future or it may need too much work for this
to work?
(Other than some folio order member in address_space?)

Thanks,
Qu

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

end of thread, other threads:[~2022-09-14 23:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14  6:17 Is it possible to force an address_space to always allocate pages in specific order? Qu Wenruo
2022-09-14 22:23 ` Matthew Wilcox
2022-09-14 23:03   ` Qu Wenruo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.