lkml.org 
[lkml]   [2020]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 06/14] block: lift setting the readahead size into the block layer
Date
On 22/07/2020 08:27, Christoph Hellwig wrote:
> + q->backing_dev_info->ra_pages =
> + max(queue_io_opt(q) * 2 / PAGE_SIZE, VM_READAHEAD_PAGES);

Dumb question, wouldn't a '>> PAGE_SHIFT' be better instead of a potentially
costly division?

Or aren't we caring at all as it's a) not in the fast-path and b) compilers
can optimize it to a shift?

\
 
 \ /
  Last update: 2020-07-22 09:14    [W:0.204 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site