Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11d21456 authored by Markus Stockhausen's avatar Markus Stockhausen Committed by Alistair Strachan
Browse files

UPSTREAM: readahead: stricter check for bdi io_pages



ondemand_readahead() checks bdi->io_pages to cap the maximum pages
that need to be processed. This works until the readit section. If
we would do an async only readahead (async size = sync size) and
target is at beginning of window we expand the pages by another
get_next_ra_size() pages. Btrace for large reads shows that kernel
always issues a doubled size read at the beginning of processing.
Add an additional check for io_pages in the lower part of the func.
The fix helps devices that hard limit bio pages and rely on proper
handling of max_hw_read_sectors (e.g. older FusionIO cards). For
that reason it could qualify for stable.

Fixes: 9491ae4a ("mm: don't cap request size based on read-ahead setting")
Change-Id: If111344b54897555085c2a6c442d697069962f11
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMarkus Stockhausen <stockhausen@collogia.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@google.com>
parent 1e6563ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment