summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorPankaj Raghav <p.raghav@samsung.com>2024-08-22 15:50:11 +0200
committerChristian Brauner <brauner@kernel.org>2024-08-23 13:49:48 +0200
commit26cfdb395eefdb2d34e51184d8466ee04a1618d5 (patch)
treeedd9c30a132eb7b367a342d3453004a766ac582d /arch/s390
parentab95d23bab220ef845c0d422f49452a475330eaf (diff)
downloadlinux-stable-26cfdb395eefdb2d34e51184d8466ee04a1618d5.tar.gz
linux-stable-26cfdb395eefdb2d34e51184d8466ee04a1618d5.tar.bz2
linux-stable-26cfdb395eefdb2d34e51184d8466ee04a1618d5.zip
readahead: allocate folios with mapping_min_order in readahead
page_cache_ra_unbounded() was allocating single pages (0 order folios) if there was no folio found in an index. Allocate mapping_min_order folios as we need to guarantee the minimum order if it is set. page_cache_ra_order() tries to allocate folio to the page cache with a higher order if the index aligns with that order. Modify it so that the order does not go below the mapping_min_order requirement of the page cache. This function will do the right thing even if the new_order passed is less than the 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. readahead_expand() is called from readahead aops to extend the range of the readahead so this function can assume ractl->_index to be aligned with min_order. Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> Co-developed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20240822135018.1931258-4-kernel@pankajraghav.com Tested-by: David Howells <dhowells@redhat.com> Acked-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Daniel Gomez <da.gomez@samsung.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'arch/s390')
0 files changed, 0 insertions, 0 deletions