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] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e77071b-ba1f-20f4-91b8-aa0b95e92967@redhat.com>
Date:   Wed, 1 Jun 2022 11:31:50 +0800
From:   Gavin Shan <gshan@...hat.com>
To:     Sudeep Holla <sudeep.holla@....com>, linux-kernel@...r.kernel.org
Cc:     Atish Patra <atishp@...shpatra.org>,
        Atish Patra <atishp@...osinc.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Morten Rasmussen <morten.rasmussen@....com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Qing Wang <wangqing@...o.com>,
        linux-arm-kernel@...ts.infradead.org,
        linux-riscv@...ts.infradead.org, Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH v3 07/16] arch_topology: Use the last level cache
 information from the cacheinfo

On 5/25/22 4:14 PM, 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 <sudeep.holla@....com>
> ---
>   drivers/base/arch_topology.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 

Reviewed-by: Gavin Shan <gshan@...hat.com>

> 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);
>   		}
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ