Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3949067pxj; Mon, 21 Jun 2021 10:02:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDADW34m0K1c36sK2K6olcWj6iUuZ/YH4u1disaTS3P74/EG/5z43oR4jROD/kYeZUn+/h X-Received: by 2002:a17:906:a0a:: with SMTP id w10mr25810190ejf.416.1624294931853; Mon, 21 Jun 2021 10:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294931; cv=none; d=google.com; s=arc-20160816; b=zdfXdoFGjheuQnoh35dln+b+6bBo0AjJeS1MbSzr2pELW6h1dj4pBF18MYivbFB2QL XHvfc1DzJn8dulwIdX8fIeXlnVFrVlzQqBXNfJoBkLcNewGyZLBjkrMhTBNEU4uaWY+Y CVzOBT13owCIhTTS9z/oFfAd0n1izYXcGZOsis1E/LpzkOHRb9Zt0jTVqckDl5FIs2yv 3n5V01+RYyHBSQUe9YsqrOFjOCy8ulGiQXmw4lztQu0Ga9uW3eH6e751WEjzUTzrSgdU 3GOtCD75huQsXX+SnlILmoEfa6HPJPWWiggJz9hlV+NM1+Kre76UW8K9FFtMMEkS6NAi Zc2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RfuZmFTIa+BiKpP9D0IXA33fRGcBiajcpX+BWebyFZw=; b=Ggdwu1GKhNFaX+khffdwq73NKoFYFjKwZxDJ8wfq2V+fxGsnX+L6Ejvz/iQfj1N9Tb ibxRyM7sIrQruQUlHSACOKON8hycUGmkpVRm48V05A3tD/160nZw3A7GT0TPFXJ0yAG3 7o2busG9O//czI76C4mJY/oZpavJDDrg2cFWX6Mdj99PoUE9QJpC3ikUUnAyJ5LlCCT9 vq/SzUxcIhovJ3k12uAFzdvfFZKkYV4KdssAMgHwbUXFyyTdphUXNO6uhM5pUim0lAVC MauLOpRcizHl6bWzhV0/jOfuYgfnEME/vO3SAtRPMdoYXVwBqzZ1TsmqbYDnzi/2z/XY LvGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mDzJgNZc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci12si11602438ejc.295.2021.06.21.10.01.48; Mon, 21 Jun 2021 10:02:11 -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=@chromium.org header.s=google header.b=mDzJgNZc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231611AbhFURDD (ORCPT + 99 others); Mon, 21 Jun 2021 13:03:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232035AbhFURCu (ORCPT ); Mon, 21 Jun 2021 13:02:50 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56BCDC0A888B for ; Mon, 21 Jun 2021 09:33:22 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id g24so10293179pji.4 for ; Mon, 21 Jun 2021 09:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RfuZmFTIa+BiKpP9D0IXA33fRGcBiajcpX+BWebyFZw=; b=mDzJgNZcryGHFACHFEDHgkTmlIYQ/uZ4s01IIQTfG0d33to/CCfw1fwmh5sUn1rYjF G/YRtL9q75MzrMaZqzgAmXP0RPJFRmneElRZiNX+dDJqiJsu/tp9TrCT8uNNge1Vq3Gt F7xIbG2WdbCTb+k5CtoLC3Zu7/sS9NZ163zmw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=RfuZmFTIa+BiKpP9D0IXA33fRGcBiajcpX+BWebyFZw=; b=Qkz/ZGAWuvmmtUJwu6sInVrLlfC4U/mnDoqrFEnGWmMCzXmOuZPuPSpgtgWtZ3+I5y xwpw6QQHqWcp0sWO+90s/mQL+/RxyuFhOfDsIW4g6AqWYKRSXhnqL572e4yEXZd9rSB/ PS/lXZ8wE7jgLNUiJ48GPvpMK3FYjcOq0LL0FWwqKeo7RsrB/F8GcQfxmOgC2HWUju+N LQlZ3LNoZEyOZiy9m8bsg5PrG4j4fBBleMSt25zLZbQ0fi5nVAaIUJ6wNh7Dxuvdszg1 b+a7U2Jh73uenU9OtfYRNMyx9g0N1hAqjgwGYVz0Pn4k+n8gpxuvzkOTp5UhdSixNARt NJaQ== X-Gm-Message-State: AOAM531LoYHwpq6LJ2UqKUNEqgbyhLWDm+4nUvSBcsoCiA3d6eQCm48u jeL7bRuc8+JBbW5VxJsZfultxg== X-Received: by 2002:a17:90a:8d08:: with SMTP id c8mr21813735pjo.177.1624293201955; Mon, 21 Jun 2021 09:33:21 -0700 (PDT) Received: from localhost ([2620:15c:202:201:9f0f:4fd2:adeb:6f55]) by smtp.gmail.com with UTF8SMTPSA id u23sm19400322pgk.38.2021.06.21.09.33.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Jun 2021 09:33:21 -0700 (PDT) Date: Mon, 21 Jun 2021 09:33:19 -0700 From: Matthias Kaehlcke To: Odelu Kukatla Cc: georgi.djakov@linaro.org, bjorn.andersson@linaro.org, evgreen@google.com, Georgi Djakov , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, sboyd@kernel.org, mdtipton@codeaurora.org, sibis@codeaurora.org, saravanak@google.com, seansw@qti.qualcomm.com, elder@linaro.org, linux-arm-msm@vger.kernel.org, linux-arm-msm-owner@vger.kernel.org Subject: Re: [PATCH] interconnect: Aggregate bandwidth votes for unused nodes in sync_state() Message-ID: References: <1624122509-17508-1-git-send-email-okukatla@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1624122509-17508-1-git-send-email-okukatla@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 19, 2021 at 10:38:29PM +0530, Odelu Kukatla wrote: > 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 It seems this should have a 'Fixes' tag for b1d681d8d324 ("interconnect: Add sync state support")', to make sure the change makes it into the stable trees. > --- > 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)) { nit: consider handling the common case in the 'if' branch and the exception of the initial votes in 'else'. > + 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); > } > }