public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Odelu Kukatla <okukatla@codeaurora.org>
To: georgi.djakov@linaro.org, bjorn.andersson@linaro.org,
	evgreen@google.com, Georgi Djakov <djakov@kernel.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: sboyd@kernel.org, mdtipton@codeaurora.org, sibis@codeaurora.org,
	saravanak@google.com, okukatla@codeaurora.org,
	seansw@qti.qualcomm.com, elder@linaro.org,
	linux-arm-msm@vger.kernel.org,
	linux-arm-msm-owner@vger.kernel.org
Subject: [PATCH] interconnect: Aggregate bandwidth votes for unused nodes in sync_state()
Date: Sat, 19 Jun 2021 22:38:29 +0530	[thread overview]
Message-ID: <1624122509-17508-1-git-send-email-okukatla@codeaurora.org> (raw)

When removing the initial bandwidth votes in sync_state(), make sure
to call the aggregate() function for nodes which don't have any
clients yet. aggregate_requests() does not invoke aggregate()
for unused nodes.

Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
---
 drivers/interconnect/core.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 8a1e70e..1d9a00a 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -1106,7 +1106,16 @@ void icc_sync_state(struct device *dev)
 		dev_dbg(p->dev, "interconnect provider is in synced state\n");
 		list_for_each_entry(n, &p->nodes, node_list) {
 			if (n->init_avg || n->init_peak) {
-				aggregate_requests(n);
+				if (hlist_empty(&n->req_list)) {
+					if (p->pre_aggregate)
+						p->pre_aggregate(n);
+
+					p->aggregate(n, 0, 0, 0, &n->avg_bw,
+						&n->peak_bw);
+				} else {
+					aggregate_requests(n);
+				}
+
 				p->set(n, n);
 			}
 		}
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


             reply	other threads:[~2021-06-19 17:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19 17:08 Odelu Kukatla [this message]
2021-06-21 16:33 ` [PATCH] interconnect: Aggregate bandwidth votes for unused nodes in sync_state() Matthias Kaehlcke
2021-06-25 21:20 ` Mike Tipton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1624122509-17508-1-git-send-email-okukatla@codeaurora.org \
    --to=okukatla@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=djakov@kernel.org \
    --cc=elder@linaro.org \
    --cc=evgreen@google.com \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-arm-msm-owner@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mdtipton@codeaurora.org \
    --cc=saravanak@google.com \
    --cc=sboyd@kernel.org \
    --cc=seansw@qti.qualcomm.com \
    --cc=sibis@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox