From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Radu Solea <radusolea@google.com>
Cc: linux-pm@vger.kernel.org, rafael@kernel.org
Subject: Re: [PATCH v2 RESEND] thermal core: add option to run PM_POST_SUSPEND asynchronously
Date: Thu, 14 Dec 2023 09:25:00 +0100 [thread overview]
Message-ID: <b5d75de8-2006-40fa-add7-2db59f3e6cc4@linaro.org> (raw)
In-Reply-To: <CAPpbzyiUEc0_5mDOWGQyXGbN4J4x8PHHBVRRUq4bSmqFdp4XtQ@mail.gmail.com>
On 14/12/2023 01:21, Radu Solea wrote:
[ ... ]
>>> I can't go into much detail about the hardware. But let's put it this
>>> way, if thermal_zone_device_update() takes 5 ms for each device (read
>>> temp, get trips, set trips, etc). Assume 5 onboard thermal zones, on a
>>> good day, ignoring system churn you'd get to around 25ms (already
>>> significant).
>>> Now on top of that add that these devices have multiple functions,
>>> like a PMIC for example. The resume sequence is the perfect time frame
>>> where you'd encounter more than one operation aimed at any one of
>>> these devices. Unless you have uncommonly smart drivers and devices,
>>> these will be queued.
>>> The driver in most cases will spin (hardly ideal, but realistic), even
>>> if they would yield the effect on the completion of the chain is at
>>> least the same or, likely, worse.
>>>
>>> To the patch itself, I realized I've been somewhat hamfisted.
>>> thermal_zone_device_init() should not be deferred, and likely should
>>> execute for all zones before the in_suspend lock-out is released. I'll
>>> correct that once we've landed on something.
>>>
>>> To my 50ms, it's almost the worst-case, but it happens way more often
>>> than would be comfortable.
>>
>> If you call monitor_thermal_zone() instead of
>> thermal_zone_device_update(), does it speed up the resume time ?
>>
> Looks like it does, I'll rework the patch. Don't think the config
> switch is useful anymore.
Well, we probably have to go a bit further in the concept.
There are some thermal zones which may need to be checked immediately
and others no. That depends on the temperature speed behavior.
The higher is the temperature speed for a device, the lower is the
polling (including zero).
So the monitoring delay can be used as a criteria to check if the
thermal zone needs an update or postpone the monitoring.
As we don't want to change the current behavior, we can add a global
option telling the polling delay above which we call
monitor_thermal_zone() and defaulting to zero.
Does it make sense?
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2023-12-14 8:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 23:40 [PATCH v2 RESEND] thermal core: add option to run PM_POST_SUSPEND asynchronously Radu Solea
2023-11-29 12:20 ` Daniel Lezcano
2023-12-06 1:20 ` Radu Solea
2023-12-06 11:23 ` Daniel Lezcano
2023-12-11 23:25 ` Radu Solea
2023-12-12 7:00 ` Daniel Lezcano
2023-12-14 0:21 ` Radu Solea
2023-12-14 8:25 ` Daniel Lezcano [this message]
2023-12-14 18:26 ` Radu Solea
2023-12-18 19:14 ` Radu Solea
2023-12-18 19:37 ` Rafael J. Wysocki
2023-11-29 13:08 ` Rafael J. Wysocki
2023-11-30 20:33 ` Radu Solea
2023-12-01 9:12 ` Daniel Lezcano
2023-12-06 1:31 ` Radu Solea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b5d75de8-2006-40fa-add7-2db59f3e6cc4@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=radusolea@google.com \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).