linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: scsi-debug regression with 4.5-rc?
@ 2016-01-20 15:17 Ewan Milne
  2016-01-20 15:57 ` Martin K. Petersen
  0 siblings, 1 reply; 9+ messages in thread
From: Ewan Milne @ 2016-01-20 15:17 UTC (permalink / raw)
  To: Martin K. Petersen, linux-scsi
  Cc: Mike Snitzer, Zdenek Kabelac, Alasdair G Kergon

So I have a report from our test people that the optimal_io_size sysfs
value is now different by a factor of 512 from what it used to be...

>Here is what is executed:
>
>modprobe scsi_debug dev_size_mb=32 sector_size=4096 opt_blks=64
>num_tgts=1
>
>And here is what our test is capturing:
>
>/sys/dev/block/8:0/queue/optimal_io_size = 512 differs from expected
>value 
>1048576!
>
>
>(So with 64 it's 512,  with opt_blks=256 it's 2048,  but it used to be
>1048576)

This looks like it might be due to commit:

commit ca369d51b3e1649be4a72addd6d6a168cfb3f537
Author: Martin K. Petersen <martin.petersen@oracle.com>
Date:   Fri Nov 13 16:46:48 2015 -0500

    block/sd: Fix device-imposed transfer length limits

It would appear that this commit has changed the meaning of
the queue limits io_opt field to be 512-byte normalized
sectors instead of bytes.  Parts of the diff:

-       blk_queue_io_opt(sdkp->disk->queue,
-                        get_unaligned_be32(&buffer[12]) * sector_sz);

...

+       sdkp->opt_xfer_blocks = get_unaligned_be32(&buffer[12]);

...

+       if (sdkp->opt_xfer_blocks && sdkp->opt_xfer_blocks <= dev_max &&
+           sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS)
+               rw_max = q->limits.io_opt =
+                       logical_to_sectors(sdp, sdkp->opt_xfer_blocks);
+       else
+               rw_max = BLK_DEF_MAX_SECTORS;


---

Was this intentional?  I would have thought we would not want to change
the usermode meaning of this field.

-Ewan



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-03-09  1:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20 15:17 scsi-debug regression with 4.5-rc? Ewan Milne
2016-01-20 15:57 ` Martin K. Petersen
2016-03-04 15:24   ` Mike Snitzer
2016-03-05 22:44     ` Martin K. Petersen
2016-03-05 23:10     ` [PATCH] sd: Fix discard granularity when LBPRZ=1 Martin K. Petersen
2016-03-07 15:42       ` Ewan Milne
2016-03-08  2:21         ` Martin K. Petersen
2016-03-08 17:02       ` Bart Van Assche
2016-03-09  1:51         ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).