mirror-linux/kernel/cgroup
Waiman Long 39b5ef791d cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks
Commit ec5fbdfb99 ("cgroup/cpuset: Enable update_tasks_cpumask()
on top_cpuset") enabled us to pull CPUs dedicated to child partitions
from tasks in top_cpuset by ignoring per cpu kthreads. However, there
can be other kthreads that are not per cpu but have PF_NO_SETAFFINITY
flag set to indicate that we shouldn't mess with their CPU affinity.
For other kthreads, their affinity will be changed to skip CPUs dedicated
to child partitions whether it is an isolating or a scheduling one.

As all the per cpu kthreads have PF_NO_SETAFFINITY set, the
PF_NO_SETAFFINITY tasks are essentially a superset of per cpu kthreads.
Fix this issue by dropping the kthread_is_per_cpu() check and checking
the PF_NO_SETAFFINITY flag instead.

Fixes: ec5fbdfb99 ("cgroup/cpuset: Enable update_tasks_cpumask() on top_cpuset")
Signed-off-by: Waiman Long <longman@redhat.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-05-09 07:35:14 -10:00
..
Makefile kernel/cgroup: Add "dmem" memory accounting cgroup 2025-01-06 17:24:38 +01:00
cgroup-internal.h cgroup: Print message when /proc/cgroups is read on v2-only system 2025-03-11 09:22:54 -10:00
cgroup-v1.c Driver core updates for 6.15-rc1 2025-04-01 11:02:03 -07:00
cgroup.c cgroup/cpuset-v1: Add missing support for cpuset_v2_mode 2025-04-17 07:32:53 -10:00
cpuset-internal.h cgroup/cpuset: Don't allow creation of local partition over a remote one 2025-03-31 13:26:53 -10:00
cpuset-v1.c RFC cgroup/cpuset-v1: Add deprecation messages to sched_relax_domain_level 2025-03-11 09:22:54 -10:00
cpuset.c cgroup/cpuset: Extend kthread_is_per_cpu() check to all PF_NO_SETAFFINITY tasks 2025-05-09 07:35:14 -10:00
debug.c
dmem.c cgroup/dmem: Don't open-code css_for_each_descendant_pre 2025-02-19 09:50:37 +01:00
freezer.c cgroup/freezer: Add cgroup CGRP_FROZEN flag update helper 2024-10-23 09:45:09 -10:00
legacy_freezer.c cgroup: Add deprecation message to legacy freezer controller 2025-03-11 09:22:54 -10:00
misc.c cgroup/misc: Remove unused misc_cg_res_total_usage 2025-01-28 09:00:54 -10:00
namespace.c cgroup:namespace: Remove unused cgroup_namespaces_init() 2023-08-14 14:29:47 -10:00
pids.c cgroup/pids: Remove unreachable paths of pids_{can,cancel}_fork 2024-08-05 10:32:16 -10:00
rdma.c rdmacg: fix kernel-doc warnings in rdmacg 2023-06-05 09:45:14 -10:00
rstat.c cgroup: rstat: call cgroup_rstat_updated_list with cgroup_rstat_lock 2025-04-01 07:33:26 -10:00