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

Zwane Mwaikambo
2005-08-15T05:50:08Z

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.