Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2482738pxj; Sat, 19 Jun 2021 13:48:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaXo23X1V7h5Pm60iEu16h2dAnqeLr2bSQ1UXFp4vu0iyFXPEO80VN/nnfaHy+K2NgWsGV X-Received: by 2002:a6b:3119:: with SMTP id j25mr12953755ioa.64.1624135680069; Sat, 19 Jun 2021 13:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624135680; cv=none; d=google.com; s=arc-20160816; b=rreUNLIYM2JoVgkmoRt204WbSgf2G++fY5UzK7GIMHSZqUGxinTzdlkjmTy2ZD8RLL An09NDxzzRWDHZqsPPEOmNWxJeeJKfQwMDN8VDnQk8/ZcsWDosygKiVy9o6Tb025KxTf BpdwqLYglobAVLoLj64d2l5ZLGzRS282y14pAPSdAtCqyv+WYqj/bq0e5bPClkDp6AS2 xz5xaHhc8AUqpBC1Wb8fRBQLgMyIGCJstwDzCJ9hj/axzEq0RRik/ETGiZozb93Fs0lJ ycGV+n+5PeKYio7UYm5yvO8wepDiA0gCrYVgxW5JpuQuduZl+m69cJwZsAsJ2xZdLkL/ k48w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=j//viWQvsqoFQ/7oCoI6fIdZixErGKeS0nm9pZwJXwU=; b=S7YvlQKm8iFwc2K5xT/I3nD2Lwb0DDHFpTQjMxMsOeJXJgOeUViCO+2xSq/kP7yZDb 2LmxrYdCXYctI1oe2WMMZEv1h5l4FW/61k1Eg07vFpSOOlnalaTakfIcEehILIAQYQNe ol04OBZ4kCnXNUeyVRnkEI3wq5a4hFskujbae5TNXH+F+6YKbxLtL/zHTm0aB76SmXQZ 10zDzkvEnGkj/KVPdRTzj+VklwUYX9a+eRB1lOe22A/XqaNizW0wkfFG/09eq6eUvWEP yEsSZIS0axMgm/iHzUgCsVHB+8aaLqSwNDARDX6edZvrfo+d6IdtOpKPCJgMINNTzW04 BCNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=MYa2T0EI; 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 15si7752904ilz.158.2021.06.19.13.47.47; Sat, 19 Jun 2021 13:48:00 -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=MYa2T0EI; 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 S234867AbhFSRLE (ORCPT + 99 others); Sat, 19 Jun 2021 13:11:04 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:43022 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234871AbhFSRLC (ORCPT ); Sat, 19 Jun 2021 13:11:02 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1624122531; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=j//viWQvsqoFQ/7oCoI6fIdZixErGKeS0nm9pZwJXwU=; b=MYa2T0EIRdfeoIJEBuXbRiPehT55mVDo+gXeIFySJIQG62gC+AD2xnOOkBPVoa2CVtuvT/z9 xxuHmbLjvGrUtz1N0h2TO2lVZJ3y0zoRznHej267SRDz2xRpQUCgudd+kF+uQQpG+VbQaNSJ 66pfhyuMXStVT7As2g6aEXQZBG0= X-Mailgun-Sending-Ip: 198.61.254.9 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-n07.prod.us-west-2.postgun.com with SMTP id 60ce249fea2aacd7290bfcc7 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sat, 19 Jun 2021 17:08:47 GMT Sender: okukatla=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 18C15C43217; Sat, 19 Jun 2021 17:08:47 +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,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from okukatla1-linux.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okukatla) by smtp.codeaurora.org (Postfix) with ESMTPSA id 298B6C433F1; Sat, 19 Jun 2021 17:08:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 298B6C433F1 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=okukatla@codeaurora.org From: Odelu Kukatla To: georgi.djakov@linaro.org, bjorn.andersson@linaro.org, evgreen@google.com, Georgi Djakov , 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 Message-Id: <1624122509-17508-1-git-send-email-okukatla@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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