lkml.org 
[lkml]   [2016]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mm: don't cap request size based on read-ahead setting
Date
On Wednesday, November 16, 2016 12:31 PM Jens Axboe wrote:
> @@ -369,10 +369,25 @@ ondemand_readahead(struct address_space *mapping,
> bool hit_readahead_marker, pgoff_t offset,
> unsigned long req_size)
> {
> - unsigned long max = ra->ra_pages;
> + unsigned long io_pages, max_pages;
> pgoff_t prev_offset;
>
> /*
> + * If bdi->io_pages is set, that indicates the (soft) max IO size
> + * per command for that device. If we have that available, use
> + * that as the max suitable read-ahead size for this IO. Instead of
> + * capping read-ahead at ra_pages if req_size is larger, we can go
> + * up to io_pages. If io_pages isn't set, fall back to using
> + * ra_pages as a safe max.
> + */
> + io_pages = inode_to_bdi(mapping->host)->io_pages;
> + if (io_pages) {
> + max_pages = max_t(unsigned long, ra->ra_pages, req_size);
> + io_pages = min(io_pages, max_pages);

Doubt if you mean
max_pages = min(io_pages, max_pages);
> + } else
> + max_pages = ra->ra_pages;
> +


\
 
 \ /
  Last update: 2016-11-16 08:24    [W:0.034 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site