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: <21d002b1-442b-737d-6837-677256549435@efficios.com>
Date:   Fri, 18 Aug 2023 11:40:06 -0400
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Valentin Schneider <vschneid@...hat.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Swapnil Sapkal <Swapnil.Sapkal@....com>,
        Aaron Lu <aaron.lu@...el.com>,
        Julien Desfossez <jdesfossez@...italocean.com>, x86@...nel.org
Subject: Re: [RFC PATCH 2/3] sched: Introduce cpus_share_l2c

On 8/18/23 11:30, Mathieu Desnoyers wrote:
[...]
>   
> +	cluster_mask = topology_cluster_cpumask(cpu);
> +	l2c_size = cpumask_weight(cluster_mask);
> +	if (l2c_size == 1) {
> +		/* Fallback on using LLC. */
> +		l2c_size = size;
> +		l2c_id = id;
> +	}

For the fallback case, this should be:

         cluster_mask = topology_cluster_cpumask(cpu);
         l2c_size = cpumask_weight(cluster_mask);
         if (l2c_size == 1) {
                 /* Fallback on using LLC. */
                 l2c_size = size;
                 l2c_id = id;
         } else {
                 l2c_id = cpumask_first(cluster_mask);
         }
         per_cpu(sd_l2c_id, cpu) = l2c_id;
         per_cpu(sd_l2c_size, cpu) = l2c_size;

Thanks,

Mathieu


> +	l2c_id = cpumask_first(cluster_mask);
> +	per_cpu(sd_l2c_id, cpu) = l2c_id;
> +	per_cpu(sd_l2c_size, cpu) = l2c_size;
> +
>   	rcu_assign_pointer(per_cpu(sd_llc, cpu), sd);
>   	per_cpu(sd_llc_size, cpu) = size;
>   	per_cpu(sd_llc_id, cpu) = id;

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ