lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 25 Jun 2021 14:20:34 -0700
From:   Mike Tipton <mdtipton@...eaurora.org>
To:     Odelu Kukatla <okukatla@...eaurora.org>, georgi.djakov@...aro.org,
        bjorn.andersson@...aro.org, evgreen@...gle.com,
        Georgi Djakov <djakov@...nel.org>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     sboyd@...nel.org, sibis@...eaurora.org, saravanak@...gle.com,
        seansw@....qualcomm.com, elder@...aro.org,
        linux-arm-msm@...r.kernel.org, linux-arm-msm-owner@...r.kernel.org
Subject: Re: [PATCH] interconnect: Aggregate bandwidth votes for unused nodes
 in sync_state()

On 6/19/2021 10:08 AM, 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 <okukatla@...eaurora.org>
> ---
>   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);
>   			}
>   		}
> 

I ran into this issue myself last week. There is an alternative fix that 
I think is a little cleaner. The reason we need the aggregate() call 
here is that the icc-rpmh providers only add BCMs to the commit list in 
the aggregate() callback. If aggregate() isn't called, then we don't 
commit anything to HW. But, if we instead add BCMs to the commit list in 
pre_aggregate(), then the existing aggregate_requests() call is 
sufficient, since that always calls pre_aggregate() even when req_list 
is empty. That means we'd need to update icc_node_add() to call 
pre_aggregate() before aggregate(), otherwise we wouldn't commit the 
initial floors. But I think always calling pre_aggregate() before 
aggregate() is a reasonable requirement.

I've posted these changes in a patch series along with a separate 
sync-state-related fix. The solutions could co-exist, but they are 
largely redundant.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ