Re: [PATCH v3] mmc: sdhci_am654: Add support for PM suspend/resume

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

 




On 04/04/23 17:24, Ulf Hansson wrote:
> On Mon, 3 Apr 2023 at 19:42, Vignesh Raghavendra <vigneshr@xxxxxx> wrote:
>>
>> Hi,
>>
>> On 31/03/23 20:01, Ulf Hansson wrote:
>>> On Fri, 31 Mar 2023 at 12:17, Vignesh Raghavendra <vigneshr@xxxxxx> wrote:
>>>>
>>>> From: Aswath Govindraju <a-govindraju@xxxxxx>
>>>>
>>>> Add support for suspend/resume and pm_runtime resume/suspend.
>>>>
>>>> Signed-off-by: Aswath Govindraju <a-govindraju@xxxxxx>
>>>> Signed-off-by: Georgi Vlaev <g-vlaev@xxxxxx>
>>>> Signed-off-by: Vignesh Raghavendra <vigneshr@xxxxxx>
>>>> ---
>>>>
>>>> Since RFC v2:
>>>> Address all comments around sdhci_am654_remove()
>>>> Set autosuspend_delay to -1 as SDHCI will host rootfs via SD/eMMC and
>>>> autosuspend can cause long latency for user interactive applications
>>>
>>> I am curious about the "long" latency. Do you have some data that you
>>> can share for how long it takes to runtime-resume the device?
>>>
>>
>> As part of wider teting, I discovered that on certain boards (J721e EVM
>> for example), there is a latency of ~500ms for controller to start up
>> (HW limitation around card detect debounce timer [0]). This results in
>> momentary (but noticeable) lag when playing a video for example.
> 
> Ohh, that kind of sucks. There is no way to workaround that I guess?

Unfortunately no,

> 
>>
>>
>> [0[
>> https://elixir.bootlin.com/linux/latest/source/drivers/mmc/host/sdhci_am654.c#L361
>>
>>
>>> Using -1 as the default value for the autosuspend_delay seems fine to
>>> me, but did you consider using a longer timeout than the common 100ms?
>>> Could that perhaps be a better default option?
>>
>> Its more of the startup delay than how long controller should remain
>> active. So tuning autosuspend_delay does not seem to help.
>>
>>>
>>> Of course, in the end this is a choice of performance in favor of
>>> wasting energy.
>>
>> Yes, this is choice of opt-in vs opt-out. Users can tune the delay via
>> sysfs as needed.
>>
>> I am setting it to -1 to avoid regressing any userspace apps (vs
>> enabling autosuspend and then asking impacted users to set to -1)
> 
> Alright, makes sense!
> 
>>
>> One solution is to use -1 on platforms where latency is significant
>> based on compatible / SoC detection?
> 
> That's a good idea! It seems a pity to make all SoCs suffer, if there
> is only a subset that has this problem. Although, let's consider that
> as an improvement that can be done on top of $subject patch.

Sure, will follow up with a patch to reduce autosuspend_delay on
platforms w/o above issue.

> 
> So, applied for next, thanks!

Great, thanks!

-- 
Regards
Vignesh



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux