[PATCH 02/14] block: refactor disk_update_readahead

Bart Van Assche bvanassche at acm.org
Sun Jan 28 18:59:31 PST 2024


On 1/28/24 08:58, Christoph Hellwig wrote:
> +static void blk_apply_bdi_limits(struct backing_dev_info *bdi,
> +		struct queue_limits *lim)
> +{
> +	/*
> +	 * For read-ahead of large files to be effective, we need to read ahead
> +	 * at least twice the optimal I/O size.
> +	 */
> +	bdi->ra_pages = max(lim->io_opt * 2 / PAGE_SIZE, VM_READAHEAD_PAGES);
> +	bdi->io_pages = lim->max_sectors >> (PAGE_SHIFT - 9);
> +}

Would this be a good opportunity to change (PAGE_SHIFT - 9) into PAGE_SECTORS_SHIFT?

Thanks,

Bart.



More information about the Linux-nvme mailing list