On Fri, Jul 18, 2025 at 12:48:56PM -0400, Waiman Long <longman@xxxxxxxxxx> wrote:
Chen Ridong reported that cpuset could report a kernel warning for a taskDoes this make sense for cpuset v2 (or no cpuset at all for that matter)?
due to set_cpus_allowed_ptr() returning failure in the corner case that:
1) the task used sched_setaffinity(2) to set its CPU affinity mask to
be the same as the cpuset.cpus of its cpuset,
2) all the CPUs assigned to that cpuset were taken offline, and
3) cpuset v1 is in use and the task had to be migrated to the top cpuset.
I'm asking whether this mask modification could only be extracted into
cpuset-v1.c (like cgroup_tranfer_tasks() or a new function)