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: <ZxazF56XRJ3CJ0mN@slm.duckdns.org>
Date: Mon, 21 Oct 2024 10:01:27 -1000
From: Tejun Heo <tj@...nel.org>
To: Andrea Righi <arighi@...dia.com>
Cc: David Vernet <void@...ifault.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched_ext: introduce LLC awareness to the default idle
 selection policy

Hello,

Overall, I think this is a great idea. 

On Mon, Oct 21, 2024 at 09:13:04AM +0200, Andrea Righi wrote:
...
> +	/*
> +	 * Determine the task's LLC domain.
> +	 */
> +	sd = rcu_dereference(per_cpu(sd_llc, prev_cpu));
> +	if (sd)
> +		cpumask_and(llc_cpus, sched_domain_span(sd), p->cpus_ptr);
> +	else
> +		cpumask_copy(llc_cpus, p->cpus_ptr);

However, I wonder whether we can be a bit more efficient here. Always
copying cpumasks can become noticeable in larger machines. It should be
possible to cover most common cases without copying cpumasks - e.g. tasks
which don't have any cpumask restrictions or affine within a single LLC
(including tasks restricted to one CPU) don't need to compute a new cpumask
each time. They can use either sched_domain_span() or p->cpus_ptr directly.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ