[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f54ae85-f7b9-4666-cc05-6aa034028789@kernel.org>
Date: Tue, 21 Mar 2023 16:06:31 +0200
From: Georgi Djakov <djakov@...nel.org>
To: Konrad Dybcio <konrad.dybcio@...aro.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc: Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 2/9] interconnect: qcom: rpm: Add support for
specifying channel num
Hi Konrad,
Thanks for the patch!
On 8.03.23 23:40, Konrad Dybcio wrote:
> Some nodes, like EBI0 (DDR) or L3/LLCC, may be connected over more than
> one channel. This should be taken into account in bandwidth calcualtion,
> as we're supposed to feed msmbus with the per-channel bandwidth. Add
> support for specifying that and use it during bandwidth aggregation.
>
This looks good, but do you have any follow-up patch to use this and set
the channels in some driver?
BR,
Georgi
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> ---
> drivers/interconnect/qcom/icc-rpm.c | 7 ++++++-
> drivers/interconnect/qcom/icc-rpm.h | 2 ++
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
> index 35fd75ae70e3..27c4c6497994 100644
> --- a/drivers/interconnect/qcom/icc-rpm.c
> +++ b/drivers/interconnect/qcom/icc-rpm.c
> @@ -317,6 +317,7 @@ static void qcom_icc_bus_aggregate(struct icc_provider *provider,
> {
> struct icc_node *node;
> struct qcom_icc_node *qn;
> + u64 sum_avg[QCOM_ICC_NUM_BUCKETS];
> int i;
>
> /* Initialise aggregate values */
> @@ -334,7 +335,11 @@ static void qcom_icc_bus_aggregate(struct icc_provider *provider,
> list_for_each_entry(node, &provider->nodes, node_list) {
> qn = node->data;
> for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
> - agg_avg[i] += qn->sum_avg[i];
> + if (qn->channels)
> + sum_avg[i] = div_u64(qn->sum_avg[i], qn->channels);
> + else
> + sum_avg[i] = qn->sum_avg[i];
> + agg_avg[i] += sum_avg[i];
> agg_peak[i] = max_t(u64, agg_peak[i], qn->max_peak[i]);
> }
> }
> diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h
> index 8ba1918d7997..8aed5400afda 100644
> --- a/drivers/interconnect/qcom/icc-rpm.h
> +++ b/drivers/interconnect/qcom/icc-rpm.h
> @@ -66,6 +66,7 @@ struct qcom_icc_qos {
> * @id: a unique node identifier
> * @links: an array of nodes where we can go next while traversing
> * @num_links: the total number of @links
> + * @channels: number of channels at this node (e.g. DDR channels)
> * @buswidth: width of the interconnect between a node and the bus (bytes)
> * @sum_avg: current sum aggregate value of all avg bw requests
> * @max_peak: current max aggregate value of all peak bw requests
> @@ -78,6 +79,7 @@ struct qcom_icc_node {
> u16 id;
> const u16 *links;
> u16 num_links;
> + u16 channels;
> u16 buswidth;
> u64 sum_avg[QCOM_ICC_NUM_BUCKETS];
> u64 max_peak[QCOM_ICC_NUM_BUCKETS];
>
Powered by blists - more mailing lists