aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2024-12-04 19:10:16 +0100
committerAndrew Morton <akpm@linux-foundation.org>2025-01-13 22:40:45 -0800
commitd5ea5e5e50dffd13fccedb690a0a1f27be56191a (patch)
tree4b1607b216b0350f81a740febc1c315ffbe80701 /mm/hugetlb.c
parentreadahead: don't shorten readahead window in read_pages() (diff)
downloadwireguard-linux-d5ea5e5e50dffd13fccedb690a0a1f27be56191a.tar.xz
wireguard-linux-d5ea5e5e50dffd13fccedb690a0a1f27be56191a.zip
readahead: properly shorten readahead when falling back to do_page_cache_ra()
When we succeed in creating some folios in page_cache_ra_order() but then need to fallback to single page folios, we don't shorten the amount to read passed to do_page_cache_ra() by the amount we've already read. This then results in reading more and also in placing another readahead mark in the middle of the readahead window which confuses readahead code. Fix the problem by properly reducing number of pages to read. Unlike previous attempt at this fix (commit 7c877586da31) which had to be reverted, we are now careful to check there is indeed something to read so that we don't submit negative-sized readahead. Link: https://lkml.kernel.org/r/20241204181016.15273-3-jack@suse.cz Signed-off-by: Jan Kara <jack@suse.cz> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
0 files changed, 0 insertions, 0 deletions