<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/power/qos.c, branch v5.7.4</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.7.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.7.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-03-03T22:34:51Z</updated>
<entry>
<title>PM: QoS: annotate data races in pm_qos_*_value()</title>
<updated>2020-03-03T22:34:51Z</updated>
<author>
<name>Qian Cai</name>
<email>cai@lca.pw</email>
</author>
<published>2020-02-26T01:58:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a534e924c58d2e7c07509521e87d059dd029dca1'/>
<id>urn:sha1:a534e924c58d2e7c07509521e87d059dd029dca1</id>
<content type='text'>
The target_value field in struct pm_qos_constraints is used for
lockless access to the effective constraint value of a given QoS
list, so the readers of it cannot expect it to always reflect the
most recent effective constraint value.  However, they can and do
expect it to be equal to a valid effective constraint value computed
at a certain time in the past (event though it may not be the most
recent one), so add READ|WRITE_ONCE() annotations around the
target_value accesses to prevent the compiler from possibly causing
that expectation to be unmet by generating code in an exceptionally
convoluted way.

Signed-off-by: Qian Cai &lt;cai@lca.pw&gt;
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: QoS: Make CPU latency QoS depend on CONFIG_CPU_IDLE</title>
<updated>2020-02-14T09:37:27Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-02-11T23:37:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=814d51f8889bc4afa75f647eeffd5ff0a5620e8d'/>
<id>urn:sha1:814d51f8889bc4afa75f647eeffd5ff0a5620e8d</id>
<content type='text'>
Because cpuidle is the only user of the effective constraint coming
from the CPU latency QoS, add #ifdef CONFIG_CPU_IDLE around that code
to avoid building it unnecessarily.

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>PM: QoS: Update file information comments</title>
<updated>2020-02-14T09:37:26Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-02-11T23:35:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fe52de36dc5d60960230cabec88c357113d9c32a'/>
<id>urn:sha1:fe52de36dc5d60960230cabec88c357113d9c32a</id>
<content type='text'>
Update the file information comments in include/linux/pm_qos.h
and kernel/power/qos.c by adding titles along with copyright and
authors information to them and changing the qos.c description to
better reflect its contents (outdated information is dropped from
it in particular).

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>PM: QoS: Drop PM_QOS_CPU_DMA_LATENCY and rename related functions</title>
<updated>2020-02-14T09:37:26Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-02-11T23:35:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=67b06ba01857ed077e1a66bfa139156e7c68bab2'/>
<id>urn:sha1:67b06ba01857ed077e1a66bfa139156e7c68bab2</id>
<content type='text'>
Drop the PM QoS classes enum including PM_QOS_CPU_DMA_LATENCY,
drop the wrappers around pm_qos_request(), pm_qos_request_active(),
and pm_qos_add/update/remove_request() introduced previously, rename
these functions, respectively, to cpu_latency_qos_limit(),
cpu_latency_qos_request_active(), and
cpu_latency_qos_add/update/remove_request(), and update their
kerneldoc comments.  [While at it, drop some useless comments from
these functions.]

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>PM: QoS: Adjust pm_qos_request() signature and reorder pm_qos.h</title>
<updated>2020-02-13T10:26:46Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-02-11T23:07:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e033b6c175a32870a2f7cd3741c0d48c858c2d04'/>
<id>urn:sha1:e033b6c175a32870a2f7cd3741c0d48c858c2d04</id>
<content type='text'>
Change the return type of pm_qos_request() to be the same as the
one of pm_qos_read_value() called by it internally and stop exporting
it to modules (because its only caller, cpuidle, is not modular).

Also move the pm_qos_read_value() header away from the CPU latency
QoS API function headers in pm_qos.h (because it technically does
not belong to that API).

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>PM: QoS: Simplify definitions of CPU latency QoS trace events</title>
<updated>2020-02-13T10:26:39Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-02-11T23:06:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=333eed7d20069e2d80446f5fdf9ac3868b55e7b9'/>
<id>urn:sha1:333eed7d20069e2d80446f5fdf9ac3868b55e7b9</id>
<content type='text'>
Modify the definitions of the CPU latency QoS trace events to take
one argument (since PM_QOS_CPU_DMA_LATENCY is always passed as the
pm_qos_class argument to them) and update the documentation of them
accordingly (while at it, make it explicitly mention CPU latency QoS
and relocate it after the device PM QoS trace events documentation).

The names and output format of the trace events do not change to
preserve user space compatibility.

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>PM: QoS: Rename things related to the CPU latency QoS</title>
<updated>2020-02-13T10:26:33Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-02-11T23:04:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2552d3520132a22834e0be85c51168a7a798608c'/>
<id>urn:sha1:2552d3520132a22834e0be85c51168a7a798608c</id>
<content type='text'>
First, rename PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE to
PM_QOS_CPU_LATENCY_DEFAULT_VALUE and update all of the code
referring to it accordingly.

Next, rename cpu_dma_constraints to cpu_latency_constraints, move
the definition of it closer to the functions referring to it and
update all of them accordingly.  [While at it, add a comment to mark
the start of the code related to the CPU latency QoS.]

Finally, rename the pm_qos_power_*() family of functions and
pm_qos_power_fops to cpu_latency_qos_*() and cpu_latency_qos_fops,
respectively, and update the definition of cpu_latency_qos_miscdev.
[While at it, update the miscdev interface code start comment.]

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;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.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>PM: QoS: Drop PM_QOS_CPU_DMA_LATENCY notifier chain</title>
<updated>2020-02-13T10:26:27Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-02-11T23:02:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3a4a0042228a854d9b1073050620820b4a977e6e'/>
<id>urn:sha1:3a4a0042228a854d9b1073050620820b4a977e6e</id>
<content type='text'>
Notice that pm_qos_remove_notifier() is not used at all and the only
caller of pm_qos_add_notifier() is the cpuidle core, which only needs
the PM_QOS_CPU_DMA_LATENCY notifier to invoke wake_up_all_idle_cpus()
upon changes of the PM_QOS_CPU_DMA_LATENCY target value.

First, to ensure that wake_up_all_idle_cpus() will be called
whenever the PM_QOS_CPU_DMA_LATENCY target value changes, modify the
pm_qos_add/update/remove_request() family of functions to check if
the effective constraint for the PM_QOS_CPU_DMA_LATENCY has changed
and call wake_up_all_idle_cpus() directly in that case.

Next, drop the PM_QOS_CPU_DMA_LATENCY notifier from cpuidle as it is
not necessary any more.

Finally, drop both pm_qos_add_notifier() and pm_qos_remove_notifier(),
as they have no callers now, along with cpu_dma_lat_notifier which is
only used by them.

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>PM: QoS: Redefine struct pm_qos_request and drop struct pm_qos_object</title>
<updated>2020-02-13T10:26:19Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-02-11T23:01:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=02c92a378940ba1a46b6b7ad277f1b07f8093dbc'/>
<id>urn:sha1:02c92a378940ba1a46b6b7ad277f1b07f8093dbc</id>
<content type='text'>
First, change the definition of struct pm_qos_request so that it
contains a struct pm_qos_constraints pointer (called "qos") instead
of a PM QoS class number (in preparation for dropping the PM QoS
classes concept altogether going forward) and move its definition
(along with the definition of struct pm_qos_flags_request that does
not change) after the definition of struct pm_qos_constraints.

Next, drop the definition of struct pm_qos_object and the null_pm_qos
and cpu_dma_pm_qos variables of that type along with pm_qos_array[]
holding pointers to them and change the code to refer to the
pm_qos_constraints structure directly or to use the new qos pointer
in struct pm_qos_request for that instead of going through
pm_qos_array[] to access it.  Also update kerneldoc comments that
mention pm_qos_class to refer to PM_QOS_CPU_DMA_LATENCY directly
instead.

Finally, drop register_pm_qos_misc(), introduce cpu_latency_qos_miscdev
(with the name field set to "cpu_dma_latency") to implement the
CPU latency QoS interface in /dev/ and register it directly from
pm_qos_power_init().

After these changes the notion of PM QoS classes remains only in the
API (in the form of redundant function parameters that are ignored)
and in the definitions of PM QoS trace events.

While at it, some redundant local variables are dropped etc.

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>PM: QoS: Clean up misc device file operations</title>
<updated>2020-02-13T10:26:13Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-02-11T23:00:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=299a229830a29a2d691ac17b27964c7d820f16a6'/>
<id>urn:sha1:299a229830a29a2d691ac17b27964c7d820f16a6</id>
<content type='text'>
Reorder the code to avoid using extra function header declarations
for the pm_qos_power_*() family of functions and drop those
declarations.

Also clean up the internals of those functions to consolidate checks,
avoid using redundant local variables and similar.

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>
</feed>
