Re: [RFC][2.6.12.3] IRQ compression/sharing patch

From: Zwane Mwaikambo
Date: Mon Aug 15 2005 - 00:50:31 EST


On Sun, 14 Aug 2005, James Cleverdon wrote:

> > > +static int next_irq = 16;
> >
> > Won't this need a lock for hotplug later?
>
> That's what I thought originally, but maybe not. We initialize all RTEs
> and assign IRQs+vectors fairly early in boot, plus store the results in
> arrays. Thereafter the functions just return the preallocated values.
>
> Hmmm... Since the I/O APIC init comes after the other CPUs are brought
> online, and since I don't understand all that the MSI driver is trying
> to accomplish, it might be safer to use a spin lock anyway.

With respect to vector allocation, the MSI driver locks around
assign_irq_vector, it doesn't look like next_irq is used in that path so
you shouldn't need a lock if it's only used in single threaded init. This
of course would change if IOAPICs were added after boot.

-
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/