Re: [PATCH v2 2/3] x86, x2apic: limit the vector reservation to theuser specified mask

From: Ingo Molnar
Date: Mon Jun 25 2012 - 05:54:06 EST



* Yinghai Lu <yinghai@xxxxxxxxxx> wrote:

> On Thu, Jun 21, 2012 at 3:02 PM, Suresh Siddha
> <suresh.b.siddha@xxxxxxxxx> wrote:
> > For the x2apic cluster mode, vector for an interrupt is currently reserved on
> > all the cpu's that are part of the x2apic cluster. But the interrupts will
> > be routed only to the cluster (derived from the first cpu in the mask) members
> > specified in the mask. So there is no need to reserve the vector in the unused
> > cluster members.
> >
> > Modify __assign_irq_vector() to reserve the vectors based on the user
> > specified irq destination mask. If the new mask is a proper subset of
> > the currently used mask, cleanup the vector allocation on the unused cpu
> > members.
> >
> > Also, allow the apic driver to tune the vector domain based on the
> > affinity mask (which in most cases is the user-specified mask).
> >
> > Signed-off-by: Suresh Siddha <suresh.b.siddha@xxxxxxxxx>
> > Acked-by: Yinghai Lu <yinghai@xxxxxxxxxx>
> > ---
> > Âarch/x86/include/asm/apic.h      |  Â9 ++++++---
> > Âarch/x86/kernel/apic/apic_noop.c   Â|  Â3 ++-
> > Âarch/x86/kernel/apic/io_apic.c    Â|  31 +++++++++++++++----------------
> > Âarch/x86/kernel/apic/x2apic_cluster.c | Â Â6 +++---
> > Â4 files changed, 26 insertions(+), 23 deletions(-)
> >
> > diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
> > index b37fa12..c276809 100644
> > --- a/arch/x86/include/asm/apic.h
> > +++ b/arch/x86/include/asm/apic.h
> > @@ -306,7 +306,8 @@ struct apic {
> > Â Â Â Âunsigned long (*check_apicid_used)(physid_mask_t *map, int apicid);
> > Â Â Â Âunsigned long (*check_apicid_present)(int apicid);
> >
> > - Â Â Â void (*vector_allocation_domain)(int cpu, struct cpumask *retmask);
> > + Â Â Â void (*vector_allocation_domain)(int cpu, struct cpumask *retmask,
> > + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âconst struct cpumask *mask);
>
> there is one left over for vsmp_64 need to be updated.
>
> arch/x86/kernel/vsmp_64.c: In function âvsmp_apic_post_initâ:
> arch/x86/kernel/vsmp_64.c:221:33: warning: assignment from
> incompatible pointer type [enabled by default]

Other than this omission the series looks good to me as well, if
this is fixed and the Acked-by's of the three gents is added to
all three patches then I can apply it to -tip.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/