Re: [PATCH 5/5] x86: update nr_irqs according cpu num

From: H. Peter Anvin
Date: Fri Jan 08 2010 - 16:21:33 EST


On 01/08/2010 12:06 PM, Yinghai Lu wrote:
>>>
>>> Ouch! Unless I misread this code this will leave nr_irqs at
>>> NR_IRQS_LEGACY. aka 16.
>>>
>>> Let's do something stupid and simple.
>>> nr_irqs = nr_cpus_ids * 256; /* Semi-arbitrary number */
>>
>> This would be 1048576 on the biggest machines we currently support.
>> Now, the number of IRQ *vectors* is limited to
>> (224-system vectors)*(cpu count), so one could argue that if there is
>> anything that is not semi-arbitrary it would be that number, but that
>> doesn't account for vector sharing.
>
> (256 - 32 - 16 - system_vectors) * cpu_count + 16
>
> the 16 is legacy from IRQ0 to 15 has domain with all cpus set.
>

... assuming you're on a platform with a legacy PIC. I would like to
see the legacy PIC hard-coded assumptions to go away, and instead be
done as runtime allocations on the relevant platforms.

> some interface in /proc/interrupts need it to make sure sth in sequence.

I can't even parse this sentence, never mind figuring out what it would
mean. Certainly there is a better way to do that?

-hpa

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