From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: John Garry <john.garry@huawei.com>,
jejb@linux.ibm.com, martin.petersen@oracle.com, hch@lst.de
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
iommu@lists.linux.dev
Subject: Re: [PATCH] scsi: sd: Add a comment about limiting max_sectors to shost optimal limit
Date: Tue, 19 Jul 2022 19:06:49 +0900 [thread overview]
Message-ID: <af41fbeb-c2b1-e4c8-8b75-fa03fb9eb993@opensource.wdc.com> (raw)
In-Reply-To: <1658224264-49972-1-git-send-email-john.garry@huawei.com>
On 7/19/22 18:51, John Garry wrote:
> Add a comment about limiting the default the SCSI disk request_queue
> max_sectors initial value to that of the SCSI host optimal sectors limit.
>
> Suggested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Signed-off-by: John Garry <john.garry@huawei.com>
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index 3eaee1f7aaca..ed9f43f9512e 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -3296,6 +3296,11 @@ static int sd_revalidate_disk(struct gendisk *disk)
> (sector_t)BLK_DEF_MAX_SECTORS);
> }
>
> + /*
> + * Limit default to SCSI host optimal sector limit if set. There may be
> + * an impact on performance for when the size of a request exceeds this
> + * host limit.
> + */
> rw_max = min_not_zero(rw_max, sdp->host->opt_sectors);
>
> /* Do not exceed controller limit */
Looks good.
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2022-07-19 10:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 9:51 [PATCH] scsi: sd: Add a comment about limiting max_sectors to shost optimal limit John Garry
2022-07-19 10:06 ` Damien Le Moal [this message]
2022-07-20 1:21 ` Martin K. Petersen
2022-07-22 15:15 ` Christoph Hellwig
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=af41fbeb-c2b1-e4c8-8b75-fa03fb9eb993@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=jejb@linux.ibm.com \
--cc=john.garry@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox