Discard performance regression after "scsi: sd: Remove LBPRZ dependency for discards"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin

We have a sata ssd with following parameters,

  max_ws_blocks = 0
  max_unmap_blocks = 262143
  lbprz = 1
  lbpu = 1
  unmap_limit_for_ws = 0

But the discard performance is very different on 3.10 and 4.18 series,
On 3.10 series, the bw of discard is ~60G/s, but on 4.18, it is only ~2.7G/s
The reason is the discard_max_bytes,
3.10 series : 4294966784
4.18 series : 134217216

This difference happen after commit 
commit bcd069bb250acf6088b60d189ab3ec3ae8dd11a5 (scsi: sd: Remove LBPRZ dependency for discards)

@@ -2842,7 +2829,7 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
                                sd_config_discard(sdkp, SD_LBP_WS16);
 
                } else {        /* LBP VPD page tells us what to use */
-                       if (sdkp->lbpu && sdkp->max_unmap_blocks && !sdkp->lbprz)
+                       if (sdkp->lbpu && sdkp->max_unmap_blocks)
                                sd_config_discard(sdkp, SD_LBP_UNMAP);
                        else if (sdkp->lbpws)
                                sd_config_discard(sdkp, SD_LBP_WS16);

Before this commit, it enters SD_LBP_WS16 case, but after the patch, it enters SD_LBP_UNMAP.

Which should be the correct case ?

Thanks and Best regards
Jianchao



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux