public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Wang Yugui <wangyugui@e16-tech.com>
To: Wang Yugui <wangyugui@e16-tech.com>
Cc: linux-block@vger.kernel.org
Subject: Re: scsi optimal_io_size changed from 0 on kernel 6.6, to 16773120(32760*512, 4095*4096) on kernel 6.12/6.16
Date: Wed, 25 Jun 2025 07:00:20 +0800	[thread overview]
Message-ID: <20250625070020.B0D8.409509F4@e16-tech.com> (raw)
In-Reply-To: <20250624091020.071E.409509F4@e16-tech.com>

Hi,

> scsi optimal_io_size changed
> from 0 on kernel 6.6, 
> to 16773120(32760*512, 4095*4096) on kernel 6.12/6.16
> 
> I tested in on same device and same os dist, but different kernel version.
> both ssd/sas and ssd/sata connected to same hba(mpi3sas driver).
> 
> Is there some feature that changed the default value?

we walked around this problem with a local dirty fix.

diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index 351b028ef893..638dbafd695d 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -240,6 +240,9 @@ static int sas_host_setup(struct transport_container *tc, struct device *dev,
 	if (dma_dev->dma_mask) {
 		shost->opt_sectors = min_t(unsigned int, shost->max_sectors,
 				dma_opt_mapping_size(dma_dev) >> SECTOR_SHIFT);
+		/* /sys/block/sda/queue/optimal_io_size 16773120(32760*512, 4095*4096) @T7610 @kernel 6.12+ */
+		shost->opt_sectors = min_t(unsigned int, shost->opt_sectors,
+				SZ_1M >> SECTOR_SHIFT);
 	}
 
 	return 0;

Best Regards
Wang Yugui (wangyugui@e16-tech.com)
2025/06/25


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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24  1:10 scsi optimal_io_size changed from 0 on kernel 6.6, to 16773120(32760*512, 4095*4096) on kernel 6.12/6.16 Wang Yugui
2025-06-24 23:00 ` Wang Yugui [this message]
2025-06-25  1:42 ` Martin K. Petersen
2025-06-25  2:10   ` Wang Yugui

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=20250625070020.B0D8.409509F4@e16-tech.com \
    --to=wangyugui@e16-tech.com \
    --cc=linux-block@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox