linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Improve IPA mechanisms in low temperature state
@ 2021-04-21 17:41 Lukasz Luba
  2021-04-21 17:41 ` [PATCH v3 1/3] thermal: power_allocator: maintain the device statistics from going stale Lukasz Luba
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lukasz Luba @ 2021-04-21 17:41 UTC (permalink / raw)
  To: linux-kernel, daniel.lezcano; +Cc: linux-pm, amitk, rui.zhang, lukasz.luba

Hi all,

This v3 patch set aims to address the issues present in IPA when the
temperature is below the first trip point and cooling devices are not
throttled.
The first patch adds a basic check of cooling devices power to keep the
internal statistics fresh. This allows to avoid issue when the statistics
cover very long period, because they were not maintained.
The second patch addresses an issue described in bugzilla [1], which is:
unneccessary updating cooling devices when their state has not changed
because they are not throttled. This update triggers sending an event,
which should be avoided. Thus, patch 2/3 adds a tracking mechanism if
the update was triggered and makes sure it will be done only once when
the temperature continue to stay below first trip point.
The last patch 3/3 is co-developed by Daniel, who presented the code
during v2 review. I have created a helper function based on his idea,
which can now be used inside IPA governor lock protected code. 

changelog:
v3:
- new patch 3/3 co-developed with Daniel
v2:
- patch 2/2 uses now simple 'update' bool flag and information from
  'tz->last_temperature'
- patch 1/2 has small change in the comment
- re-based on top of today's thermal/next branch

Regards,
Lukasz Luba

[1] https://bugzilla.kernel.org/show_bug.cgi?id=212501

Lukasz Luba (3):
  thermal: power_allocator: maintain the device statistics from going
    stale
  thermal: power_allocator: update once cooling devices when temp is low
  thermal: create a helper __thermal_cdev_update() without a lock

 drivers/thermal/gov_power_allocator.c | 21 ++++++++++++++++----
 drivers/thermal/thermal_core.h        |  1 +
 drivers/thermal/thermal_helpers.c     | 28 +++++++++++++++++----------
 3 files changed, 36 insertions(+), 14 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-22 10:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-21 17:41 [PATCH v3 0/3] Improve IPA mechanisms in low temperature state Lukasz Luba
2021-04-21 17:41 ` [PATCH v3 1/3] thermal: power_allocator: maintain the device statistics from going stale Lukasz Luba
2021-04-21 17:41 ` [PATCH v3 2/3] thermal: power_allocator: update once cooling devices when temp is low Lukasz Luba
2021-04-21 17:41 ` [PATCH v3 3/3] thermal: create a helper __thermal_cdev_update() without a lock Lukasz Luba
2021-04-22  7:58   ` Daniel Lezcano
2021-04-22  8:21     ` Lukasz Luba
2021-04-22 10:26       ` Daniel Lezcano

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).