Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp274755iof; Mon, 6 Jun 2022 03:17:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxR33GlNiujsRjEFq0nnJ3sCcxS5bhDHpQx55QreH0AuThLOwTJo0/Z+u2I12dHoOaJ5oN3 X-Received: by 2002:a63:1c5c:0:b0:3fc:109e:8386 with SMTP id c28-20020a631c5c000000b003fc109e8386mr20854007pgm.133.1654510658091; Mon, 06 Jun 2022 03:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654510658; cv=none; d=google.com; s=arc-20160816; b=0IHYdjWmLLmiiFp7mN80Scg4CdgrUACw/lfiNMu9z1QcFdnOnOGuIGr9VlkHNFNNMo lvyxFx6SNnw6Js0MHuNxEfpckJ/2AcFbge9bFyRJ+mZ7dW5YNQkZ6Gh3MlcoX4ZSy3YN utlOk8g8XqFcNBmvRSqwRCHgNBXB/DKltMzyeduX2SDtH+HaycH6lJDzq2khenfSZHjy Wwm3+YyzIT9DtHlpcFRX8eVS/0o0v3JdBPcybUXqRxYZa8S1z7WMTSvDYcTkYMQvwK9n x2MIlwi6TNh4Ach8j56i4BJvZc1gtKwnArlE63oYhkjzL8OQ42sbmslU6vWSTQflPVV8 5E8Q== 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; bh=PKdLVN6Uq7JdvjksPr17vqWU7UHKHC7Uk+m9hFUGR8I=; b=tGSyERWIq/5K2puUJkQCpGukmGg6xuKwABpHIqSSz8qMOBoWdDjA+ZoZNTndj40wfM Rk6qWkecifOgjmW43b5qH7zaTR1mssz6rPhTMRq7MllPOZb0NNEGrK2cfWYdbM029AFL weNiLhMtq4maDFwQzFZxlc/EzN1yVCPYGU0AwEsEjsS+5jGsY09O/X0qYOzJlgp8WtnX y5PbuhmIqrwlCNMk6urw/L9dPmmQL6DrYQ3cEaY3YBTytMWgn5VgzMT0aACFP2YGJolU TG6t3gcmuAqXe+Yv90P+XnHEOjvv8vVQ0F/PaRfLlhkUp9yLuskTKHld5IY+e3bPgNj9 VStA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f193-20020a636aca000000b003fc9b052e00si19506005pgc.771.2022.06.06.03.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 03:17:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 06D721116CE; Mon, 6 Jun 2022 02:55:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233102AbiFFJzH (ORCPT + 99 others); Mon, 6 Jun 2022 05:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233026AbiFFJzE (ORCPT ); Mon, 6 Jun 2022 05:55:04 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0CA0110C33B for ; Mon, 6 Jun 2022 02:55:04 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D501F1596; Mon, 6 Jun 2022 02:55:03 -0700 (PDT) Received: from bogus (unknown [10.57.9.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3B21D3F66F; Mon, 6 Jun 2022 02:55:02 -0700 (PDT) Date: Mon, 6 Jun 2022 10:54:15 +0100 From: Sudeep Holla To: Dietmar Eggemann Cc: linux-kernel@vger.kernel.org, Atish Patra , Atish Patra , Vincent Guittot , Morten Rasmussen , Qing Wang , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Rob Herring Subject: Re: [PATCH v3 07/16] arch_topology: Use the last level cache information from the cacheinfo Message-ID: <20220606095415.n26cugm2bo7d3rud@bogus> References: <20220525081416.3306043-1-sudeep.holla@arm.com> <20220525081416.3306043-2-sudeep.holla@arm.com> <20220525081416.3306043-3-sudeep.holla@arm.com> <20220525081416.3306043-4-sudeep.holla@arm.com> <20220525081416.3306043-5-sudeep.holla@arm.com> <20220525081416.3306043-6-sudeep.holla@arm.com> <20220525081416.3306043-7-sudeep.holla@arm.com> <20220525081416.3306043-8-sudeep.holla@arm.com> <0bf199a0-251d-323c-974a-bfd4e26f4cce@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0bf199a0-251d-323c-974a-bfd4e26f4cce@arm.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 02, 2022 at 04:26:00PM +0200, Dietmar Eggemann wrote: > On 25/05/2022 10:14, Sudeep Holla wrote: > > The cacheinfo is now initialised early along with the CPU topology > > initialisation. Instead of relying on the LLC ID information parsed > > separately only with ACPI PPTT elsewhere, migrate to use the similar > > information from the cacheinfo. > > > > This is generic for both DT and ACPI systems. The ACPI LLC ID information > > parsed separately can now be removed from arch specific code. > > > > Signed-off-by: Sudeep Holla > > --- > > drivers/base/arch_topology.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c > > index 765723448b10..4c486e4e6f2f 100644 > > --- a/drivers/base/arch_topology.c > > +++ b/drivers/base/arch_topology.c > > @@ -663,7 +663,8 @@ const struct cpumask *cpu_coregroup_mask(int cpu) > > /* not numa in package, lets use the package siblings */ > > core_mask = &cpu_topology[cpu].core_sibling; > > } > > - if (cpu_topology[cpu].llc_id != -1) { > > + > > + if (last_level_cache_is_valid(cpu)) { > > if (cpumask_subset(&cpu_topology[cpu].llc_sibling, core_mask)) > > core_mask = &cpu_topology[cpu].llc_sibling; > > } > > @@ -694,7 +695,7 @@ void update_siblings_masks(unsigned int cpuid) > > for_each_online_cpu(cpu) { > > cpu_topo = &cpu_topology[cpu]; > > > > - if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) { > > + if (last_level_cache_is_shared(cpu, cpuid)) { > > cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling); > > cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling); > > } > > I tested v3 on a Kunpeng920 (w/o CONFIG_NUMA) and it looks > like that last_level_cache_is_shared() isn't working as > expected. > Thanks a lot for detailed instrumentation, I am unable to identify why it is not working though. I will take a deeper look later. -- Regards, Sudeep