<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/thermal/gov_power_allocator.c, branch v6.3.2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3.2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3.2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-01-06T13:14:47+00:00</updated>
<entry>
<title>thermal/core/governors: Use thermal_zone_get_trip() instead of ops functions</title>
<updated>2023-01-06T13:14:47+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2022-10-03T09:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f725a23f2b7bb338a3d41ce7bf96d6c99bdb0b7'/>
<id>urn:sha1:7f725a23f2b7bb338a3d41ce7bf96d6c99bdb0b7</id>
<content type='text'>
The governors are using the ops-&gt;get_trip_* functions, Replace these
calls with thermal_zone_get_trip().

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt; # IPA
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://lore.kernel.org/r/20221003092602.1323944-5-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>thermal/core/power allocator: Remove a useless include</title>
<updated>2022-12-14T14:25:40+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2022-11-26T10:42:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de04f680b0ab71d2b9085903fe608a15541f66cb'/>
<id>urn:sha1:de04f680b0ab71d2b9085903fe608a15541f66cb</id>
<content type='text'>
This file does not use rcu, so there is no point in including
&lt;linux/rculist.h&gt;.

Remove it.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Link: https://lore.kernel.org/r/9adeec47cb5a8193016272d5c8bf936235c1711d.1669459337.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@kernel.org&gt;
</content>
</entry>
<entry>
<title>thermal/core: Move the thermal zone lock out of the governors</title>
<updated>2022-08-17T12:09:39+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2022-08-05T15:38:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=670a5e356cb6dfc61b87b599eba483af6a3a99ad'/>
<id>urn:sha1:670a5e356cb6dfc61b87b599eba483af6a3a99ad</id>
<content type='text'>
All the governors throttling ops are taking/releasing the lock at the
beginning and the end of the function.

We can move the mutex to the throttling call site instead.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20220805153834.2510142-4-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>thermal/governors: Group the thermal zone lock inside the throttle function</title>
<updated>2022-08-17T12:09:39+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2022-08-05T15:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=63561fe36b094729d3d4d274bafaa030b39e89f6'/>
<id>urn:sha1:63561fe36b094729d3d4d274bafaa030b39e89f6</id>
<content type='text'>
The thermal zone lock is taken in the different places in the
throttling path.

At the first glance it does not hurt to move them at the beginning and
the end of the 'throttle' function. That will allow a consolidation of
the lock in the next following changes.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20220805153834.2510142-3-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>thermal/core: Rename 'trips' to 'num_trips'</title>
<updated>2022-07-28T15:29:56+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linexp.org</email>
</author>
<published>2022-07-22T20:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5bfcd30f88fdb0ce830229e7ccdeddcb7a59b04'/>
<id>urn:sha1:e5bfcd30f88fdb0ce830229e7ccdeddcb7a59b04</id>
<content type='text'>
In order to use thermal trips defined in the thermal structure, rename
the 'trips' field to 'num_trips' to have the 'trips' field containing the
thermal trip points.

Cc: Alexandre Bailon &lt;abailon@baylibre.com&gt;
Cc: Kevin Hilman &lt;khilman@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linexp.org&gt;
Link: https://lore.kernel.org/r/20220722200007.1839356-8-daniel.lezcano@linexp.org
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>thermal/core/power allocator: Use the lockless __thermal_cdev_update() function</title>
<updated>2021-04-22T21:51:32+00:00</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2021-04-22T15:36:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab39c8853737158604e154ad3b03639e74082bd6'/>
<id>urn:sha1:ab39c8853737158604e154ad3b03639e74082bd6</id>
<content type='text'>
Use the new helper function and avoid unnecessery second lock/unlock,
which was present in old approach with thermal_cdev_update().

Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20210422153624.6074-4-lukasz.luba@arm.com
</content>
</entry>
<entry>
<title>thermal/core/power_allocator: Update once cooling devices when temp is low</title>
<updated>2021-04-22T21:51:14+00:00</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2021-04-22T11:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0952177f2a1f63ba87a1940fac21768f402c0b94'/>
<id>urn:sha1:0952177f2a1f63ba87a1940fac21768f402c0b94</id>
<content type='text'>
The cooling device state change generates an event, also when there is no
need, because temperature is low and device is not throttled. Avoid to
unnecessary update the cooling device which means also not sending event.
The cooling device state has not changed because the temperature is still
below the first activation trip point value, so we can do this.
Add a tracking mechanism to make sure it updates cooling devices only
once - when the temperature dropps below first trip point.

Reported-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20210422114308.29684-4-lukasz.luba@arm.com
</content>
</entry>
<entry>
<title>thermal/core/power_allocator: Maintain the device statistics from going stale</title>
<updated>2021-04-22T21:50:49+00:00</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2021-04-22T11:43:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3b60ed9b135e2c652115db691a87dc28b324bea'/>
<id>urn:sha1:d3b60ed9b135e2c652115db691a87dc28b324bea</id>
<content type='text'>
When the temperature is below the first activation trip point the cooling
devices are not checked, so they cannot maintain fresh statistics. It
leads into the situation, when temperature crosses first trip point, the
statistics are stale and show state for very long period. This has impact
on IPA algorithm calculation and wrong decisions. Thus, check the cooling
devices even when the temperature is low, to refresh these statistics.

Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20210422114308.29684-3-lukasz.luba@arm.com
</content>
</entry>
<entry>
<title>thermal/core/power_allocator: Using round the division when re-divvying up power</title>
<updated>2021-03-16T11:44:20+00:00</updated>
<author>
<name>jeson.gao</name>
<email>jeson.gao@unisoc.com</email>
</author>
<published>2021-03-15T08:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e3e14c9385c3cfb35f9da4f495acdd21f9bc25b'/>
<id>urn:sha1:6e3e14c9385c3cfb35f9da4f495acdd21f9bc25b</id>
<content type='text'>
The division is used directly in re-divvying up power, the decimal part will
be discarded, devices will get less than the extra_actor_power - 1.
if using round the division to make the calculation more accurate.

For example:
actor0 received more than its max_power, it has the extra_power 759
actor1 received less than its max_power, it require extra_actor_power 395
actor2 received less than its max_power, it require extra_actor_power 365
actor1 and actor2 require the total capped_extra_power 760

using division in re-divvying up power
actor1 would actually get the extra_actor_power 394
actor2 would actually get the extra_actor_power 364

if using round the division in re-divvying up power
actor1 would actually get the extra_actor_power 394
actor2 would actually get the extra_actor_power 365

Signed-off-by: Jeson Gao &lt;jeson.gao@unisoc.com&gt;
Reviewed-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/1615796737-4688-1-git-send-email-gao.yunxiao6@gmail.com
</content>
</entry>
<entry>
<title>thermal: power allocator: fail binding for non-power actor devices</title>
<updated>2021-01-19T21:31:10+00:00</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2021-01-19T11:41:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a583405f24bffdd9f696a8e1b2f02c297245f4d'/>
<id>urn:sha1:7a583405f24bffdd9f696a8e1b2f02c297245f4d</id>
<content type='text'>
The thermal zone can have cooling devices which are missing power actor
API. This could be due to missing Energy Model for devfreq or cpufreq
cooling device. In this case it is safe to fail the binding rather than
trying to workaround and control the temperature in such thermal zone.

Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20210119114126.19480-1-lukasz.luba@arm.com
</content>
</entry>
</feed>
