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] [day] [month] [year] [list]
Message-ID: <aB5xWuHkwh1iGERu@pavilion.home>
Date: Fri, 9 May 2025 23:19:22 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Tejun Heo <tj@...nel.org>
Cc: Waiman Long <longman@...hat.com>, Johannes Weiner <hannes@...xchg.org>,
	Michal Koutný <mkoutny@...e.com>,
	cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
	Xi Wang <xii@...gle.com>
Subject: Re: [PATCH v2] cgroup/cpuset: Extend kthread_is_per_cpu() check to
 all PF_NO_SETAFFINITY tasks

Le Fri, May 09, 2025 at 07:30:51AM -1000, Tejun Heo a écrit :
> Hello,
> 
> On Fri, May 09, 2025 at 03:18:17PM +0200, Frederic Weisbecker wrote:
> ...
> > But this makes me realize I overlooked that when I introduced the unbound kthreads
> > centralized affinity.
> > 
> > cpuset_update_tasks_cpumask() seem to blindly affine to subpartitions_cpus
> > while unbound kthreads might have their preferences (per-nodes or random cpumasks).
> > 
> > So I need to make that pass through kthread API.
> 
> I wonder whether it'd be cleaner if all kthread affinity restrictions go
> through housekeeping instead of cpuset modifying the cpumasks directly so
> that housekeeping keeps track of where different classes of kthreads can run
> and tell e.g. workqueue what to do.

Good suggestion. "isolated_cpus" should indeed be handled by housekeeping
itself. More precisely housekeeping_cpu(HK_TYPE_DOMAIN) should be updated
through some housekeeping_update() function to union the boot 'isolcpus='
and the isolated mask of cpusets partition. Waiman tried that at some point.
This will require some synchronization against the readers of HK_TYPE_DOMAIN.

It's beyond the scope of the kthreads affinity issue but yes that's all
planned within the cpusets integration of nohz_full.

Thanks.


> 
> Thanks.
> 
> -- 
> tejun

-- 
Frederic Weisbecker
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ