linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: okukatla@codeaurora.org
To: Mike Tipton <mdtipton@codeaurora.org>
Cc: djakov@kernel.org, bjorn.andersson@linaro.org, agross@kernel.org,
	saravanak@google.com, linux-arm-msm@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	mdtipton=codeaurora.org@codeaurora.org
Subject: Re: [PATCH 3/4] interconnect: qcom: icc-rpmh: Ensure floor BW is enforced for all nodes
Date: Fri, 02 Jul 2021 00:18:44 +0530	[thread overview]
Message-ID: <afaf4cb4ccc60a1c7c937a296f199f70@codeaurora.org> (raw)
In-Reply-To: <20210625212839.24155-4-mdtipton@codeaurora.org>

On 2021-06-26 02:58, Mike Tipton wrote:
> We currently only enforce BW floors for a subset of nodes in a path.
> All BCMs that need updating are queued in the pre_aggregate/aggregate
> phase. The first set() commits all queued BCMs and subsequent set()
> calls short-circuit without committing anything. Since the floor BW
> isn't set in sum_avg/max_peak until set(), then some BCMs are committed
> before their associated nodes reflect the floor.
> 
> Set the floor as each node is being aggregated. This ensures that all
> all relevant floors are set before the BCMs are committed.
> 
> Fixes: 266cd33b5913 ("interconnect: qcom: Ensure that the floor
> bandwidth value is enforced")
> Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
> ---
>  drivers/interconnect/qcom/icc-rpmh.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/interconnect/qcom/icc-rpmh.c
> b/drivers/interconnect/qcom/icc-rpmh.c
> index bf01d09dba6c..f118f57eae37 100644
> --- a/drivers/interconnect/qcom/icc-rpmh.c
> +++ b/drivers/interconnect/qcom/icc-rpmh.c
> @@ -57,6 +57,11 @@ int qcom_icc_aggregate(struct icc_node *node, u32
> tag, u32 avg_bw,
>  			qn->sum_avg[i] += avg_bw;
>  			qn->max_peak[i] = max_t(u32, qn->max_peak[i], peak_bw);
>  		}
> +
> +		if (node->init_avg || node->init_peak) {
> +			qn->sum_avg[i] = max_t(u64, qn->sum_avg[i], node->init_avg);
> +			qn->max_peak[i] = max_t(u64, qn->max_peak[i], node->init_peak);
> +		}
Hi Mike,
Original problem is BCMs not getting added to commit_list for unused 
nodes, right? that is solved by moving *_bcm_voter_add() to 
pre_aggregate().
I could not get why we need to do above change, we are enforcing node 
votes with floor votes in framework + below code snippet that you 
removed.
How would adding this code in qcom_icc_aggregate() make difference? Is 
there any other issue that i am not to able to get?
>  	}
> 
>  	*agg_avg += avg_bw;
> @@ -90,11 +95,6 @@ int qcom_icc_set(struct icc_node *src, struct 
> icc_node *dst)
>  	qp = to_qcom_provider(node->provider);
>  	qn = node->data;
> 
> -	qn->sum_avg[QCOM_ICC_BUCKET_AMC] = max_t(u64,
> qn->sum_avg[QCOM_ICC_BUCKET_AMC],
> -						 node->avg_bw);
> -	qn->max_peak[QCOM_ICC_BUCKET_AMC] = max_t(u64,
> qn->max_peak[QCOM_ICC_BUCKET_AMC],
> -						  node->peak_bw);
> -
>  	qcom_icc_bcm_voter_commit(qp->voter);
> 
>  	return 0;

  parent reply	other threads:[~2021-07-01 18:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 21:28 [PATCH 0/4] interconnect: Fix sync-state issues Mike Tipton
2021-06-25 21:28 ` [PATCH 1/4] interconnect: Zero initial BW after sync-state Mike Tipton
2021-07-01 16:56   ` okukatla
2021-07-12 15:41     ` Mike Tipton
2021-06-25 21:28 ` [PATCH 2/4] interconnect: Always call pre_aggregate before aggregate Mike Tipton
2021-07-01 18:55   ` okukatla
2021-07-12 15:39     ` Mike Tipton
2021-06-25 21:28 ` [PATCH 3/4] interconnect: qcom: icc-rpmh: Ensure floor BW is enforced for all nodes Mike Tipton
2021-06-26  2:27   ` kernel test robot
2021-07-01 18:48   ` okukatla [this message]
2021-07-12 15:45     ` Mike Tipton
2021-06-25 21:28 ` [PATCH 4/4] interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate 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=afaf4cb4ccc60a1c7c937a296f199f70@codeaurora.org \
    --to=okukatla@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=djakov@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@codeaurora.org \
    --cc=mdtipton@codeaurora.org \
    --cc=saravanak@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).