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.

Reply via email to