mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 13:23:23 +01:00
kthread: Rely on HK_TYPE_DOMAIN for preferred affinity management
Unbound kthreads want to run neither on nohz_full CPUs nor on domain isolated CPUs. And since nohz_full implies domain isolation, checking the latter is enough to verify both. Therefore exclude kthreads from domain isolation. Signed-off-by: Frederic Weisbecker <[email protected]> Reviewed-by: Waiman Long <[email protected]> Cc: Marco Crivellari <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Waiman Long <[email protected]>
This commit is contained in:
1 parent
92a734606e
commit
041ee6f372
1 file changed
+5
-3
+5
-3
@@ -362,18 +362,20 @@ static void kthread_fetch_affinity(struct kthread *kthread, struct cpumask *cpum
|
||||
{
|
||||
const struct cpumask *pref;
|
||||
|
||||
guard(rcu)();
|
||||
|
||||
if (kthread->preferred_affinity) {
|
||||
pref = kthread->preferred_affinity;
|
||||
} else {
|
||||
if (kthread->node == NUMA_NO_NODE)
|
||||
pref = housekeeping_cpumask(HK_TYPE_KTHREAD);
|
||||
pref = housekeeping_cpumask(HK_TYPE_DOMAIN);
|
||||
else
|
||||
pref = cpumask_of_node(kthread->node);
|
||||
}
|
||||
|
||||
cpumask_and(cpumask, pref, housekeeping_cpumask(HK_TYPE_KTHREAD));
|
||||
cpumask_and(cpumask, pref, housekeeping_cpumask(HK_TYPE_DOMAIN));
|
||||
if (cpumask_empty(cpumask))
|
||||
cpumask_copy(cpumask, housekeeping_cpumask(HK_TYPE_KTHREAD));
|
||||
cpumask_copy(cpumask, housekeeping_cpumask(HK_TYPE_DOMAIN));
|
||||
}
|
||||
|
||||
static void kthread_affine_node(void)
|
||||
|
||||
Reference in new issue
Block a user