apply affinity hint also if the current policy is subset

--hintpolicy=subset chooses an object that has a non-empty intersection
with the affinity hint, but it never restricts the object's CPU mask
with the hint itself.  As a result, there is no guarantee that the
object's CPU mask is a subset of the hint.

This is visible for interrupts whose balancing policy is not BALANCE_CORE.
For example, if there is only one cache domain and the interrupt's policy
is BALANCE_CACHE, the chosen object will correspond to "all CPUs" and
the affinity hint will be effectively ignored.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
This commit is contained in:
Paolo Bonzini 2012-08-07 02:54:34 -04:00 committed by Neil Horman
parent 9528ca203b
commit 638d405bee

View file

@ -70,6 +70,9 @@ static void activate_mapping(struct irq_info *info, void *data __attribute__((un
} else if (info->assigned_obj) {
applied_mask = info->assigned_obj->mask;
valid_mask = 1;
if ((hint_policy == HINT_POLICY_SUBSET) &&
(!cpus_empty(info->affinity_hint)))
cpus_and(applied_mask, applied_mask, info->affinity_hint);
}
/*