All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Yugui <wangyugui@e16-tech.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-block@vger.kernel.org, wangyugui@e16-tech.com
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 10:10:57 +0800	[thread overview]
Message-ID: <20250625101056.DA49.409509F4@e16-tech.com> (raw)
In-Reply-To: <yq15xgkoayn.fsf@ca-mkp.ca.oracle.com>

Hi,

> 
> Wang,
> 
> > scsi optimal_io_size changed from 0 on kernel 6.6, to
> > 16773120(32760*512, 4095*4096) on kernel 6.12/6.16
> 
> Peculiar value. Please share the output of:

It seems the valule of 
	'shost->opt_sectors'
	'dma_opt_mapping_size(dma_dev) >> SECTOR_SHIFT'
that means the optimal_io_size of scsi host(hba).

> 
> # sg_readcap -l /dev/sdN
> 
> and
> 
> # sg_vpd -p bl /dev/sdN
> 

# lsscsi
[0:0:0:0]    disk    HITACHI  HUSMH842 CLAR100 C292  /dev/sda
[0:0:1:0]    disk    ATA      INTEL SSDSC2BB48 0121  /dev/sdb
[5:0:0:0]    cd/dvd  PLDS     DVD-ROM DS-8D9SH UD11  /dev/sr0
# sg_readcap -l /dev/sda
Read Capacity results:
   Protection: prot_en=1, p_type=1, p_i_exponent=0 [type 2 protection]
   Logical block provisioning: lbpme=1, lbprz=1
   Last LBA=195371567 (0xba5222f), Number of logical blocks=195371568
   Logical block length=512 bytes
   Logical blocks per physical block exponent=3 [so physical block length=4096 bytes]
   Lowest aligned LBA=0
Hence:
   Device size: 100030242816 bytes, 95396.3 MiB, 100.03 GB
# sg_readcap -l /dev/sda
Read Capacity results:
   Protection: prot_en=1, p_type=1, p_i_exponent=0 [type 2 protection]
   Logical block provisioning: lbpme=1, lbprz=1
   Last LBA=195371567 (0xba5222f), Number of logical blocks=195371568
   Logical block length=512 bytes
   Logical blocks per physical block exponent=3 [so physical block length=4096 bytes]
   Lowest aligned LBA=0
Hence:
   Device size: 100030242816 bytes, 95396.3 MiB, 100.03 GB
#


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


      reply	other threads:[~2025-06-25  2: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
2025-06-25  1:42 ` Martin K. Petersen
2025-06-25  2:10   ` Wang Yugui [this message]

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=20250625101056.DA49.409509F4@e16-tech.com \
    --to=wangyugui@e16-tech.com \
    --cc=linux-block@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 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.