|
|
Subscribe / Log in / New account

Huge pages in the ext4 filesystem

Huge pages in the ext4 filesystem

Posted Mar 30, 2017 10:19 UTC (Thu) by willy (subscriber, #9762)
Parent article: Huge pages in the ext4 filesystem

For supporting block size > PAGE_SIZE, we discussed creating a new data structure that smells a lot like a struct page but represents a set of non-contiguous physical pages. If fragmentation has produced a system which cannot allocate a compound page of the correct size, one could allocate a number of order-0 pages and glue them all together with this new data structure. We would then put a pointer to this new data structure in the page cache. It would behave like a compound page under some circumstances (ie page lookup, locking, reference counts, dirty bit, writeback bit, uptodate bit) but like individual pages under other circumstances (inserting PTEs, kmap(), copy_to/from_iter()).

The details here are hairy and it's far from a fully baked idea. But with this idea in mind, I think we can go ahead and start implementing arbitrary block size support in the page cache, knowing we have a filesystem-side solution if the MM really can't handle the demands of a large block size FS.

I think the MM can be made to work; setting watermarks for each in-use block size can help us keep fragmentation under control. Improving our ability to defragment the slab cache is another key component. ZONE_MOVABLE will also help.

Realistically we're at least a year away from this. There will be plenty to discuss at next year's conference.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds