<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/cpuidle/governor.c, branch v5.11-rc7</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v5.11-rc7</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v5.11-rc7'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2020-02-13T10:26:57Z</updated>
<entry>
<title>cpuidle: Call cpu_latency_qos_limit() instead of pm_qos_request()</title>
<updated>2020-02-13T10:26:57Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-02-11T23:08:42Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=f60ccc3558dd83c4db68736625642d54bf38a6db'/>
<id>urn:sha1:f60ccc3558dd83c4db68736625642d54bf38a6db</id>
<content type='text'>
Call cpu_latency_qos_limit() instead of pm_qos_request(), because the
latter is going to be dropped.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Tested-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
</content>
</entry>
<entry>
<title>cpuidle: Use nanoseconds as the unit of time</title>
<updated>2019-11-11T20:56:07Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2019-11-07T14:25:12Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=c1d51f684c72b5eb2aecbbd47be3a2977a2dc903'/>
<id>urn:sha1:c1d51f684c72b5eb2aecbbd47be3a2977a2dc903</id>
<content type='text'>
Currently, the cpuidle subsystem uses microseconds as the unit of
time which (among other things) causes the idle loop to incur some
integer division overhead for no clear benefit.

In order to allow cpuidle to measure time in nanoseconds, add two
new fields, exit_latency_ns and target_residency_ns, to represent the
exit latency and target residency of an idle state in nanoseconds,
respectively, to struct cpuidle_state and initialize them with the
help of the corresponding values in microseconds provided by drivers.
Additionally, change cpuidle_governor_latency_req() to return the
idle state exit latency constraint in nanoseconds.

Also meeasure idle state residency (last_residency_ns in struct
cpuidle_device and time_ns in struct cpuidle_driver) in nanoseconds
and update the cpuidle core and governors accordingly.

However, the menu governor still computes typical intervals in
microseconds to avoid integer overflows.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Doug Smythies &lt;dsmythies@telus.net&gt;
Tested-by: Doug Smythies &lt;dsmythies@telus.net&gt;
</content>
</entry>
<entry>
<title>cpuidle: allow governor switch on cpuidle_register_driver()</title>
<updated>2019-09-11T15:36:30Z</updated>
<author>
<name>Joao Martins</name>
<email>joao.m.martins@oracle.com</email>
</author>
<published>2019-09-07T23:45:21Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=cb5d8c45ab6c3daf8269e550cfb2d5018a876fe3'/>
<id>urn:sha1:cb5d8c45ab6c3daf8269e550cfb2d5018a876fe3</id>
<content type='text'>
The recently introduced haltpoll driver is largely only useful with
haltpoll governor. To allow drivers to associate with a particular idle
behaviour, add a @governor property to 'struct cpuidle_driver' and thus
allow a cpuidle driver to switch to a *preferred* governor on idle driver
registration. We save the previous governor, and when an idle driver is
unregistered we switch back to that.

The @governor can be overridden by cpuidle.governor= boot param or
alternatively be ignored if the governor doesn't exist.

Signed-off-by: Joao Martins &lt;joao.m.martins@oracle.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / QOS: Rename __dev_pm_qos_read_value() and dev_pm_qos_raw_read_value()</title>
<updated>2019-07-04T08:40:54Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2019-07-04T07:36:18Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=8262331eaaf751076fb2c781f492bafd8344591d'/>
<id>urn:sha1:8262331eaaf751076fb2c781f492bafd8344591d</id>
<content type='text'>
dev_pm_qos_read_value() will soon need to support more constraint types
(min/max frequency) and will have another argument to it, i.e. type of
the constraint. While that is fine for the existing users of
dev_pm_qos_read_value(), but not that optimal for the callers of
__dev_pm_qos_read_value() and dev_pm_qos_raw_read_value() as all the
callers of these two routines are only looking for resume latency
constraint.

Lets make these two routines care only about the resume latency
constraint and rename them to __dev_pm_qos_resume_latency() and
dev_pm_qos_raw_resume_latency().

Suggested-by: Rafael J. Wysocki &lt;rjw@rjwysocki.net&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: governor: Add new governors to cpuidle_governors again</title>
<updated>2019-03-12T22:46:55Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2019-03-12T18:13:13Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=22782b3f9bb8ae21c710e2880db21bc729771e92'/>
<id>urn:sha1:22782b3f9bb8ae21c710e2880db21bc729771e92</id>
<content type='text'>
After commit 61cb5758d3c4 ("cpuidle: Add cpuidle.governor= command
line parameter") new cpuidle governors are not added to the list
of available governors, so governor selection via sysfs doesn't
work as expected (even though it is rarely used anyway).

Fix that by making cpuidle_register_governor() add new governors to
cpuidle_governors again.

Fixes: 61cb5758d3c4 ("cpuidle: Add cpuidle.governor= command line parameter")
Reported-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: 5.0+ &lt;stable@vger.kernel.org&gt; # 5.0+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: Add cpuidle.governor= command line parameter</title>
<updated>2018-12-11T11:08:44Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2018-12-05T22:45:34Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=61cb5758d3c46bc1ba87694fefc0d9653613ce6b'/>
<id>urn:sha1:61cb5758d3c46bc1ba87694fefc0d9653613ce6b</id>
<content type='text'>
Add cpuidle.governor= command line parameter to allow the default
cpuidle governor to be replaced.

That is useful, for example, if someone running a tickful kernel
wants to use the menu governor on it.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: governors: Consolidate PM QoS handling</title>
<updated>2018-05-30T21:13:00Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2018-05-30T11:43:01Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=0fc784fb09f6db8d6650aac137daa779da25c73b'/>
<id>urn:sha1:0fc784fb09f6db8d6650aac137daa779da25c73b</id>
<content type='text'>
There is some code duplication related to the PM QoS handling between
the existing cpuidle governors, so move that code to a common helper
function and call that from the governors.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: Avoid NULL argument in cpuidle_switch_governor()</title>
<updated>2018-01-05T13:01:30Z</updated>
<author>
<name>gaurav jindal</name>
<email>gauravjindal1104@gmail.com</email>
</author>
<published>2018-01-05T13:01:30Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=3cfd68b5ba8737d28bfcf9b6487ea4d9216b8504'/>
<id>urn:sha1:3cfd68b5ba8737d28bfcf9b6487ea4d9216b8504</id>
<content type='text'>
Checks if the new governor is NULL before updating the
cupidle_curr_governor.

Signed-off-by: gaurav jindal &lt;gauravjindal1104@gmail.com&gt;
[ rjw : Subject ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: governors: Remove remaining old module code</title>
<updated>2016-10-21T12:49:51Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2016-10-05T07:33:12Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=e5f1b245870d59be0e6cc3b33edf5406a3b59648'/>
<id>urn:sha1:e5f1b245870d59be0e6cc3b33edf5406a3b59648</id>
<content type='text'>
The governor's code use try_module_get() and put_module() to refcount
the governor's module. But the governors are not compiled as module.

The refcount does not prevent to switch the governor or unload
a module as they aren't compiled as modules. The code is pointless,
so remove it.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: Replace strnicmp with strncasecmp</title>
<updated>2014-09-24T23:17:10Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2014-09-16T20:51:26Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=9133664097dd4aca0bed4882a86f0bfccbf07e53'/>
<id>urn:sha1:9133664097dd4aca0bed4882a86f0bfccbf07e53</id>
<content type='text'>
The kernel used to contain two functions for length-delimited,
case-insensitive string comparison, strnicmp with correct semantics
and a slightly buggy strncasecmp. The latter is the POSIX name, so
strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper
for the new strncasecmp to avoid breaking existing users.

To allow the compat wrapper strnicmp to be removed at some point in
the future, and to avoid the extra indirection cost, do
s/strnicmp/strncasecmp/g.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
