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@xxxxxxxxxxxx) 2025/06/25