Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp908681pxv; Thu, 1 Jul 2021 12:04:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwheuCrUQJkgguAGg/rdk1RcBTDbO0tm9IugWPxGUCWl72MAgKOF+HDJ4vDDLhq/iOjrvY0 X-Received: by 2002:a92:c84f:: with SMTP id b15mr624704ilq.27.1625166289948; Thu, 01 Jul 2021 12:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625166289; cv=none; d=google.com; s=arc-20160816; b=H+WLo7XNrKd9Z5w61jorL0r8Efu9nid+eMQE3cDwhZODtuIpOTidAvcvkG5Mrvyljh Wg+x+xDXZ9uKWAEaC7RYG88In/rU086rnuhWEISXWefzwP0WD5LrVX70uNRW3ZcQP8IF JjGpw3zfbrY5h53D5sZ7jODb2Eu6aqoXHMI3/wx1qMQtulQ6bR2bsKTj+U28gEqMwyKy psKn6haqfGAzFGBxOmFTX2K9nbxPLiXUWCpfMgswDO79AkTt8HUKZBUv0/xHmAI56KCv E9tnX0QPccF9qRWjggHj88HMVKzVB8Ok0s4A6KfaYuEE/FtOzR+QMjNAA4TIvENeisn1 +WaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=blxOe96Hr8SQcdVl95JnLY5mZV4CcHsOypImKe+oKsg=; b=wqVZmapqaDuTj9NhYCoOHqx5bdJEEPkJqkE9FYVQzG4HaaNvp4IGa/gROXgtd10ewj o9TsxjikTeJGUKaSlsTLO3OS9z3J4qy36sJ4D3Fj71+vJ8FhV/xTbKYi+ZormMPT9z1S wMJ/dyiVaJtaDngE5ZxFQ/wv1FcZHKjMczP5Dt0lrv+r6skxof0mixxkDKqUbkbgeSNW vhHuIuBblgLF2lfGGGs29b3nDTuXK2R2bO2r3NCja3IB7Ig/TvELpr8q0Bmq3xJJxIrT mVT8Yyi6mjSc6gx78GhUwHsu4urqELiAHDZ5Hud0sW74RPgvmuhVksAVAtw2aqPYqeJr YjYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=U25QPp46; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k12si832131jad.28.2021.07.01.12.04.35; Thu, 01 Jul 2021 12:04:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=U25QPp46; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232859AbhGASvt (ORCPT + 99 others); Thu, 1 Jul 2021 14:51:49 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:34354 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbhGASvt (ORCPT ); Thu, 1 Jul 2021 14:51:49 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1625165358; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=blxOe96Hr8SQcdVl95JnLY5mZV4CcHsOypImKe+oKsg=; b=U25QPp46+nW9zNA02RkqMUNvNsM11J1K46/6N6Xw05xvSn1HijEOjDySzMMK37JJLxftGy2r PKdxiupFAjFN2ULG64+DwaEGNGfEzY42lSJkel2IE0hYcfqmrOTEjNfrfBIAF8fejieB2Ngc LrNnqpn35rp1LtIvbTSAzVsE3EI= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-east-1.postgun.com with SMTP id 60de0e0eec0b18a745fd994b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 01 Jul 2021 18:48:46 GMT Sender: okukatla=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id A7CA0C43460; Thu, 1 Jul 2021 18:48:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: okukatla) by smtp.codeaurora.org (Postfix) with ESMTPSA id DA2A6C433F1; Thu, 1 Jul 2021 18:48:44 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 02 Jul 2021 00:18:44 +0530 From: okukatla@codeaurora.org To: Mike Tipton 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 In-Reply-To: <20210625212839.24155-4-mdtipton@codeaurora.org> References: <20210625212839.24155-1-mdtipton@codeaurora.org> <20210625212839.24155-4-mdtipton@codeaurora.org> Message-ID: X-Sender: okukatla@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 > --- > 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;