Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: Decouple HK_FLAG_WQ and HK_FLAG_DOMAIN cpumask fetch

To prepare for supporting each feature of the housekeeping cpumask
toward cpuset, prepare each of the HK_FLAG_* entries to move to their
own cpumask with enforcing to fetch them individually. The new
constraint is that multiple HK_FLAG_* entries can't be mixed together
anymore in a single call to housekeeping cpumask().

This will later allow, for example, to runtime modify the cpulist passed
through "isolcpus=", "nohz_full=" and "rcu_nocbs=" kernel boot
parameters.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Juri Lelli <juri.lelli@redhat.com>
Reviewed-by: Phil Auld <pauld@redhat.com>
Link: https://lore.kernel.org/r/20220207155910.527133-4-frederic@kernel.org

authored by

Frederic Weisbecker and committed by
Peter Zijlstra
c8fb9f22 7b45b51e

+3 -3
+3 -3
net/core/net-sysfs.c
··· 823 823 { 824 824 struct rps_map *old_map, *map; 825 825 cpumask_var_t mask; 826 - int err, cpu, i, hk_flags; 826 + int err, cpu, i; 827 827 static DEFINE_MUTEX(rps_map_mutex); 828 828 829 829 if (!capable(CAP_NET_ADMIN)) ··· 839 839 } 840 840 841 841 if (!cpumask_empty(mask)) { 842 - hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ; 843 - cpumask_and(mask, mask, housekeeping_cpumask(hk_flags)); 842 + cpumask_and(mask, mask, housekeeping_cpumask(HK_FLAG_DOMAIN)); 843 + cpumask_and(mask, mask, housekeeping_cpumask(HK_FLAG_WQ)); 844 844 if (cpumask_empty(mask)) { 845 845 free_cpumask_var(mask); 846 846 return -EINVAL;