From: Lukasz Luba <lukasz.luba@arm.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Re: [PATCH v1 0/3] thermal/debugfs: Fix and clean up trip point statistics updates
Date: Mon, 22 Apr 2024 12:37:18 +0100 [thread overview]
Message-ID: <3a8f1978-c5df-40d6-91ca-276431bb01e1@arm.com> (raw)
In-Reply-To: <4918025.31r3eYUQgx@kreacher>
Hi Rafael,
On 4/17/24 14:07, Rafael J. Wysocki wrote:
> Hi Everyone,
>
> The first patch in this series addresses the problem of updating trip
> point statistics prematurely for trip points that have just been
> crossed on the way down (please see the patch changelog for details).
>
> The way it does that renders the following cleanup patch inapplicable:
>
> https://lore.kernel.org/linux-pm/2321994.ElGaqSPkdT@kreacher/
>
> The remaining two patches in the series are cleanups on top of the
> first one.
>
> This series is based on an older patch series posted last week:
>
> https://lore.kernel.org/linux-pm/13515747.uLZWGnKmhe@kreacher/
>
> but it can be trivially rebased on top of the current linux-next.
>
> Thanks!
>
>
>
I've checked this patch patch set on top of your bleeding-edge
which has thermal re-work as well. The patch set looks good
and works properly.
Although, I have found some issue in this debug info files and
I'm not sure if this is expected or not. If not I can address this
and send some small fix for it.
When I read the cooling device residency statistics, I don't
get updates for the first time the state is used. It can only
be counted when that state was known and finished it's usage.
IMO it is not the right behavior, isn't it?
Experiment:
My trip points are 70degC and 75degC and I'm setting emulated
temperature to cross them and get cooling states 1 then 0.
As you can see the statistics counter only starts showing value after
after trip crossing down.
------------------------------------8<-----------------------------------
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
root@arm:~#
root@arm:~#
root@arm:~# echo 71000 > /sys/class/thermal/thermal_zone0/emul_temp
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
root@arm:~# echo 76000 > /sys/class/thermal/thermal_zone0/emul_temp
root@arm:~#
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
0 518197
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
0 518197
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
0 518197
root@arm:~# echo 71000 > /sys/class/thermal/thermal_zone0/emul_temp
root@arm:~#
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
0 520066
1 17567
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
0 522653
1 17567
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
0 526151
1 17567
root@arm:~# echo 66000 > /sys/class/thermal/thermal_zone0/emul_temp
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
0 537366
1 17567
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
0 544936
1 17567
root@arm:~# cat
/sys/kernel/debug/thermal/cooling_devices/0/time_in_state_ms
State Residency
0 556694
1 17567
root@arm:~#
------------------------------->8----------------------------------------
Please let me know what do you think about that behavior.
Regards,
Lukasz
next prev parent reply other threads:[~2024-04-22 11:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 13:07 [PATCH v1 0/3] thermal/debugfs: Fix and clean up trip point statistics updates Rafael J. Wysocki
2024-04-17 13:09 ` [PATCH v1 1/3] thermal/debugfs: Avoid excessive updates of trip point statistics Rafael J. Wysocki
2024-04-22 11:14 ` Lukasz Luba
2024-04-23 15:54 ` Daniel Lezcano
2024-04-17 13:10 ` [PATCH v1 2/3] thermal/debugfs: Clean up thermal_debug_update_temp() Rafael J. Wysocki
2024-04-22 11:15 ` Lukasz Luba
2024-04-23 15:30 ` Daniel Lezcano
2024-04-17 13:11 ` [PATCH v1 3/3] thermal/debugfs: Rename thermal_debug_update_temp() to thermal_debug_update_trip_stats() Rafael J. Wysocki
2024-04-22 11:15 ` Lukasz Luba
2024-04-23 15:30 ` Daniel Lezcano
2024-04-22 11:37 ` Lukasz Luba [this message]
2024-04-22 14:20 ` [PATCH v1 0/3] thermal/debugfs: Fix and clean up trip point statistics updates Rafael J. Wysocki
2024-04-22 15:34 ` Daniel Lezcano
2024-04-22 15:48 ` Rafael J. Wysocki
2024-04-22 16:12 ` Daniel Lezcano
2024-04-23 12:26 ` Rafael J. Wysocki
2024-04-23 13:38 ` Lukasz Luba
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=3a8f1978-c5df-40d6-91ca-276431bb01e1@arm.com \
--to=lukasz.luba@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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