diff options
author | Markus Stockhausen <stockhausen@collogia.de> | 2018-07-27 09:09:53 -0600 |
---|---|---|
committer | Alistair Strachan <astrachan@google.com> | 2019-01-23 21:46:33 +0000 |
commit | f2d65ea603e2043e80c63cf6dcd41d6a0ce8c841 (patch) | |
tree | d2412f69d6ba6acbc5ed6c3f470d4bf4828c57c3 /arch | |
parent | e7c8b35e486775af65636a2a2b2766c3def9a8e8 (diff) |
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: Markus Stockhausen <stockhausen@collogia.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions