All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-mm@vger.kernel.org
Subject: Re: [PATCH] block: Improve read ahead size for rotational devices
Date: Mon, 16 Jun 2025 17:24:43 -0400	[thread overview]
Message-ID: <yq1zfe7xv9s.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20250616062856.1629897-1-dlemoal@kernel.org> (Damien Le Moal's message of "Mon, 16 Jun 2025 15:28:56 +0900")


Hi Damien!

> Modify blk_apply_bdi_limits() to use a device max_sectors limit to
> calculate the ra_pages field of struct backing_dev_info, when the
> device is a rotational one (BLK_FEAT_ROTATIONAL feature is set).

I much prefer doing it here. I don't think overriding io_opt in SCSI is
appropriate. Applications and filesystems need to be able to determine
whether a SCSI device reports an optimal I/O size or not. Overloading
the queue limit with readahead semantics does not belong in SCSI.

> For a SCSI disk, this defaults to 2560 KB, which significantly improve
> performance for buffered reads.

I believe this number came from a common RAID stripe configuration at
the time. However, it's really not a great default and has caused
problems with many devices that expect a power of two. Personally, I'd
like this default to be something like 2MB or 4MB. MD, DM, and most
hardware RAID devices report their stripe width correctly so the
existing "RAID-friendly" default really shouldn't be needed.

Anyway. That's orthogonal to this particular change...

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen

  reply	other threads:[~2025-06-16 21:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16  6:28 [PATCH] block: Improve read ahead size for rotational devices Damien Le Moal
2025-06-16 21:24 ` Martin K. Petersen [this message]
2025-06-16 22:45   ` Damien Le Moal
2025-06-17  5:10   ` Christoph Hellwig
2025-06-17  5:09 ` Christoph Hellwig
2025-06-17  6:58 ` John Garry
2025-07-29  7:58 ` Damien Le Moal
2025-07-29 12:27 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yq1zfe7xv9s.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.