lkml.org 
[lkml]   [2021]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] scsi: ufs: Allow async suspend/resume callbacks
From
Date
On 7/28/21 11:48 PM, Avri Altman wrote:
> Vincent wrote:
>> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>> index b87ff68aa9aa..9ec5c308a0ea 100644
>> --- a/drivers/scsi/ufs/ufshcd.c
>> +++ b/drivers/scsi/ufs/ufshcd.c
>> @@ -9625,6 +9625,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem
>> *mmio_base, unsigned int irq)
>> async_schedule(ufshcd_async_scan, hba);
>> ufs_sysfs_add_nodes(hba->dev);
>>
>> + device_enable_async_suspend(dev);
>> return 0;
> Isn't device_enable_async_suspend is being called for each lun in scsi_sysfs_add_sdev Anyway?

Hi Avri,

Our measurements have shown that resume takes longer than it should with
encryption enabled. While suspending we change the power mode of the UFS
device to a mode in which it loses crypto keys. Restoring crypto keys
during resume (blk_ksm_reprogram_all_keys()) takes about 31 ms. This is
the long pole and takes much more time than resuming LUNs. This patch
makes UFS resume happen concurrently with resuming other devices in the
system instead of serializing it. Measurements have shown that this
patch significantly improves the time needed to resume an Android device.

Bart.

\
 
 \ /
  Last update: 2021-07-30 18:05    [W:0.726 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site