Message ID | 1637117108-230103-16-git-send-email-chenxiang66@hisilicon.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Add runtime PM support for libsas | expand |
Please consider this rewrite: On 17/11/2021 02:45, chenxiang wrote: scsi: hisi_sas: Use autosuspend for the host controller > From: Xiang Chen<chenxiang66@hisilicon.com> > > For some scenarios, it may send many IOs in a short time, then SAS controller > will enter suspend and resume frequently which is invalid. > To avoid it, use autosuspend mode for SAS controller and set default > autosuspend delay time to 5s. The controller may frequently enter and exit suspend for each IO which we need to deal with. This is inefficient and may cause too much suspend+resume activity for the controller. To avoid this, use a default 5s autosuspend for the controller to stop frequently suspending and resuming. This value may still be still modified via sysfs. > > Signed-off-by: Xiang Chen<chenxiang66@hisilicon.com> > Signed-off-by: John Garry<john.garry@huawei.com> Acked-by please Thanks, John
在 2021/12/13 18:50, John Garry 写道: > Please consider this rewrite: ok, i will consider to rewrite it in next version > > On 17/11/2021 02:45, chenxiang wrote: > > scsi: hisi_sas: Use autosuspend for the host controller > >> From: Xiang Chen<chenxiang66@hisilicon.com> >> >> For some scenarios, it may send many IOs in a short time, then SAS >> controller >> will enter suspend and resume frequently which is invalid. >> To avoid it, use autosuspend mode for SAS controller and set default >> autosuspend delay time to 5s. > > The controller may frequently enter and exit suspend for each IO which > we need to deal with. This is inefficient and may cause too much > suspend+resume activity for the controller. > > To avoid this, use a default 5s autosuspend for the controller to stop > frequently suspending and resuming. This value may still be still > modified via sysfs. > >> >> Signed-off-by: Xiang Chen<chenxiang66@hisilicon.com> >> Signed-off-by: John Garry<john.garry@huawei.com> > > Acked-by please ok > > Thanks, > John > > . >
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index a5695ae8b73b..d96fe636e984 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -4777,6 +4777,8 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id) scsi_scan_host(shost); + pm_runtime_set_autosuspend_delay(dev, 5000); + pm_runtime_use_autosuspend(dev); /* * For the situation that there are ATA disks connected with SAS * controller, it additionally creates ata_port which will affect the