Re: [PATCH 2/3] x86: x2apic/cluster: Make use of lowest prioritydelivery mode

From: Alexander Gordeev
Date: Tue May 22 2012 - 05:36:14 EST


On Mon, May 21, 2012 at 04:33:03PM -0700, Yinghai Lu wrote:
> >>        *dest_id = apic->cpu_mask_to_apicid_and(mask, cfg->domain);
> >>
> >> So we really need to submit all possible CPUs here ^^^ to be able finding the
> >> best/heaviest cluster out of the 'mask'.
> >
> > ok.
>
> Maybe you can not simply to change that to possible_cpu_mask.
>
> otherwise assign_irq_vector will try to get same vector for all cpus
> for one irq.
>
> then will make x2apic cluster mode will one support 224 irqs instead.

I am curious if we broke this threshold since the current design was introduced
in 2006? Not without an opposition from some notable maintainers ;)

> so you need to make vector_allocation_domain() to be less cpu set.

Yeah, reserving a vector for dozens of CPUs while up to eight will actually use
it seems an overkill. On the other hand, vector_allocation_domain() has been
either all-CPUs or single-CPU so far.

May be it is time to bring some intelligence here?

I.e. if we move cluster selection from cpu_mask_to_apicid{,_and}() to
vector_allocation_domain() ...

void vector_allocation_domain(int cpu,
const struct cpumask *cpumask,
struct cpumask *retmask);

... then it seems nicely fits into __ioapic_set_affinity(). Have to ensure it,
though.

>
> Yinghai

--
Regards,
Alexander Gordeev
agordeev@xxxxxxxxxx
--
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/