diff options
author | Pankaj Raghav <p.raghav@samsung.com> | 2024-08-22 15:50:10 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-08-23 13:49:48 +0200 |
commit | ab95d23bab220ef845c0d422f49452a475330eaf (patch) | |
tree | d9afa7c6086649ef33703800e7a059a33562c5b3 /mm/readahead.c | |
parent | fs: Allow fine-grained control of folio sizes (diff) | |
download | linux-ab95d23bab220ef845c0d422f49452a475330eaf.tar.xz linux-ab95d23bab220ef845c0d422f49452a475330eaf.zip |
filemap: allocate mapping_min_order folios in the page cache
filemap_create_folio() and do_read_cache_folio() were always allocating
folio of order 0. __filemap_get_folio was trying to allocate higher
order folios when fgp_flags had higher order hint set but it will default
to order 0 folio if higher order memory allocation fails.
Supporting mapping_min_order implies that we guarantee each folio in the
page cache has at least an order of mapping_min_order. When adding new
folios to the page cache we must also ensure the index used is aligned to
the mapping_min_order as the page cache requires the index to be aligned
to the order of the folio.
Co-developed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Link: https://lore.kernel.org/r/20240822135018.1931258-3-kernel@pankajraghav.com
Tested-by: David Howells <dhowells@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'mm/readahead.c')
0 files changed, 0 insertions, 0 deletions