Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

interconnect: Do not skip aggregation for disabled paths

When an interconnect path is being disabled, currently we don't aggregate
the requests for it afterwards. But the re-aggregation step shouldn't be
skipped, as it may leave the nodes with outdated bandwidth data. This
outdated data may actually keep the path still enabled and prevent the
device from going into lower power states.

Reported-by: Atul Dhudase <adhudase@codeaurora.org>
Fixes: 7d374b209083 ("interconnect: Add helpers for enabling/disabling a path")
Reviewed-by: Sibi Sankar <sibis@codeaurora.org>
Tested-by: Atul Dhudase <adhudase@codeaurora.org>
Reviewed-by: Atul Dhudase <adhudase@codeaurora.org>
Link: https://lore.kernel.org/r/20200721120740.3436-1-georgi.djakov@linaro.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Link: https://lore.kernel.org/r/20200723083735.5616-2-georgi.djakov@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Georgi Djakov and committed by
Greg Kroah-Hartman
91b44981 b34e7e29

+9 -3
+9 -3
drivers/interconnect/core.c
··· 243 243 { 244 244 struct icc_provider *p = node->provider; 245 245 struct icc_req *r; 246 + u32 avg_bw, peak_bw; 246 247 247 248 node->avg_bw = 0; 248 249 node->peak_bw = 0; ··· 252 251 p->pre_aggregate(node); 253 252 254 253 hlist_for_each_entry(r, &node->req_list, req_node) { 255 - if (!r->enabled) 256 - continue; 257 - p->aggregate(node, r->tag, r->avg_bw, r->peak_bw, 254 + if (r->enabled) { 255 + avg_bw = r->avg_bw; 256 + peak_bw = r->peak_bw; 257 + } else { 258 + avg_bw = 0; 259 + peak_bw = 0; 260 + } 261 + p->aggregate(node, r->tag, avg_bw, peak_bw, 258 262 &node->avg_bw, &node->peak_bw); 259 263 } 260 264