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: <Z2Lz6VMLUgFJsBwi@slm.duckdns.org>
Date: Wed, 18 Dec 2024 06:10:17 -1000
From: Tejun Heo <tj@...nel.org>
To: Andrea Righi <arighi@...dia.com>
Cc: David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>,
	Yury Norov <yury.norov@...il.com>, Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Juri Lelli <juri.lelli@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Valentin Schneider <vschneid@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] sched_ext: Introduce per-node idle cpumasks

Hello,

On Wed, Dec 18, 2024 at 11:21:30AM +0100, Andrea Righi wrote:
...
> > Are node IDs guaranteed to be consecutive? Shouldn't it be `node >=
> > nr_node_ids`? Also, should probably add node_possible(node)?
> 
> Or even better add node_online(node), an offline NUMA node shouldn't be
> used in this context.

That can be too but then we'd have to worry about synchronizing against
going on/offline. Looks like that's protected by mem_hotplug_lock, so we'd
have to require get_online_mems() around these iterations, which might not
be worth it. Besides, if we want to triger abort on incorrect input, we'd
have to call sched_ext ops under mem_hotplug_lock, which we probably can't
do.

...
> > Is rcu_read_lock() necessary? Does lockdep warn if the explicit
> > rcu_read_lock() is dropped?
> 
> Good point, the other for_each_numa_hop_mask() iterator requires it, but
> only to access the cpumasks via rcu_dereference(). Since we are iterating
> node IDs I think we can get rid of rcu_read_lock/unlock() here. I'll double
> check if lockdep complains without it.

Yeah, this function should always be called with preemption disabled, so
even if rcu_read_lock() is required, it should already be implied by the
context.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ