Re: [PATCH 5.10] scsi: hisi_sas: Revert "scsi: hisi_sas: Limit max hw sectors for v3 HW"

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

 



Hi, John

在 2022/09/27 21:06, John Garry 写道:
On 27/09/2022 14:01, Yu Kuai wrote:
This reverts commit 24cd0b9bfdff126c066032b0d40ab0962d35e777.

1) commit 4e89dce72521 ("iommu/iova: Retry from last rb tree node if
iova search fails") tries to fix that iova allocation can fail while
there are still free space available. This is not backported to 5.10
stable.

This arrived in 5.11, I think

2) commit fce54ed02757 ("scsi: hisi_sas: Limit max hw sectors for v3
HW") fix the performance regression introduced by 1), however, this
is just a temporary solution and will cause io performance regression
because it limit max io size to PAGE_SIZE * 32(128k for 4k page_size).

Did you really notice a performance regression? In what scenario? which kernel versions?

We are using 5.10, and test tool is fs_mark and it's doing writeback,
and benefits from io merge, before this patch, avgqusz is 300+, and this
patch will limit avgqusz to 128.

I think that in any other case that io size is greater than 128k, this
patch will probably have defects.

Thanks,
Kuai

3) John Garry posted a patchset to fix the problem.
4) The temporary solution is reverted.



It's weird that the patch in 2) is backported to 5.10 stable alone,
while the right thing to do is to backport them all together.

I would tend to agree. I did not notice fce54ed02757 backported at all. But I did consider backporting it to address 4e89dce72521. Anyway, the proper solution is merged for 6.0 in 4cbfca5f7750 ("scsi: scsi_transport_sas: cap shost opt_sectors according to DMA optimal limit") and I have a revert of "scsi: hisi_sas: Limit max hw sectors for v3 HW" queued for 6.1, but I would not plan on reverting for stable.

Please let me know if any issue here.

Thanks,
John


Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>
---
  drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 7 -------
  1 file changed, 7 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index dfe7e6370d84..cd41dc061d87 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -2738,7 +2738,6 @@ static int slave_configure_v3_hw(struct scsi_device *sdev)
      struct hisi_hba *hisi_hba = shost_priv(shost);
      struct device *dev = hisi_hba->dev;
      int ret = sas_slave_configure(sdev);
-    unsigned int max_sectors;
      if (ret)
          return ret;
@@ -2756,12 +2755,6 @@ static int slave_configure_v3_hw(struct scsi_device *sdev)
          }
      }
-    /* Set according to IOMMU IOVA caching limit */
-    max_sectors = min_t(size_t, queue_max_hw_sectors(sdev->request_queue),
-                (PAGE_SIZE * 32) >> SECTOR_SHIFT);
-
-    blk_queue_max_hw_sectors(sdev->request_queue, max_sectors);
-
      return 0;
  }

.





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux