[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <eea63f29-54ce-ef82-62c6-92193558908f@ti.com>
Date: Wed, 5 Apr 2023 09:05:00 +0530
From: Vignesh Raghavendra <vigneshr@...com>
To: Ulf Hansson <ulf.hansson@...aro.org>
CC: Adrian Hunter <adrian.hunter@...el.com>,
<linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v3] mmc: sdhci_am654: Add support for PM suspend/resume
On 04/04/23 17:24, Ulf Hansson wrote:
> On Mon, 3 Apr 2023 at 19:42, Vignesh Raghavendra <vigneshr@...com> wrote:
>>
>> Hi,
>>
>> On 31/03/23 20:01, Ulf Hansson wrote:
>>> On Fri, 31 Mar 2023 at 12:17, Vignesh Raghavendra <vigneshr@...com> wrote:
>>>>
>>>> From: Aswath Govindraju <a-govindraju@...com>
>>>>
>>>> Add support for suspend/resume and pm_runtime resume/suspend.
>>>>
>>>> Signed-off-by: Aswath Govindraju <a-govindraju@...com>
>>>> Signed-off-by: Georgi Vlaev <g-vlaev@...com>
>>>> Signed-off-by: Vignesh Raghavendra <vigneshr@...com>
>>>> ---
>>>>
>>>> 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
Powered by blists - more mailing lists