Re: [PATCH v2] cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks
From: Tejun Heo
Date: Fri May 09 2025 - 13:31:05 EST
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.
Thanks.
--
tejun