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: <Z88OOena_fucXLVl@slm.duckdns.org>
Date: Mon, 10 Mar 2025 06:07:21 -1000
From: Tejun Heo <tj@...nel.org>
To: Andrea Righi <arighi@...dia.com>
Cc: David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>,
	bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] sched_ext: idle: Introduce the concept of allowed
 CPUs

Hello,

On Sun, Mar 09, 2025 at 04:39:40PM +0100, Andrea Righi wrote:
> > Would just using a pre-allocated cpumask to do pre-and on @cpus_allowed
> > work? This won't only be used for topology support (e.g. soft partitioning
> > in scx_layered and scx_mitosis may want to use multi-topology-unit spanning
> > subsets) and I'm not sure assuming and optimizing for that is a good idea
> > for generic API.
> 
> We can pre-allocate two additional (per-cpu) cpumasks to do:
>  - cpumask_and(numa_cpus, numa_span(cpu), cpus_allowed)
>  - cpumask_and(llc_cpus, llc_span(cpu), cpus_allowed)
> 
> And update/use them only when it's needed. In this way the API would be
> generic without making any implicit assumption about @cpus_allowed.

I'm not quite following why two masks would be necessary. The user is
providing two masks and and'ing those two masks result in a single
cpus_allowed mask which can then be passed down to the existing pick
functions, no?

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ