Re: [PATCH 0/8] tip related: radix tree for spareseirq and logical flat clean up

From: Jeremy Fitzhardinge
Date: Sat Feb 13 2010 - 17:13:19 EST


I don't have the code in front of me, but I think that change should be OK. Xen just wants to initiate interrupt delivery for a given irq. At least for x86; I won't make any claims for ia64.

J

ebiederm@xxxxxxxxxxxx wrote:

>"H. Peter Anvin" <hpa@xxxxxxxxx> writes:
>
>> On 02/12/2010 07:44 PM, Eric W. Biederman wrote:
>>>
>>> Thanks for keeping this work alive.
>>>
>>
>> Indeed. I am hoping to put this in tip tomorrow or so.
>>
>>> I just skimmed through do_IRQ and I happened to notice that
>>> we have an unnecessary inefficiency that using a radix tree for
>>> irq_to_desc will magnify.
>>>
>>> handle_irq should take an struct irq_desc * instead of a unsigned int irq.
>>>
>>> and the per cpu vector_irq array should become a per cpu vector_desc array.
>>>
>>> As soon as irq_to_desc is more than &irq_desc[irq] this saves us work
>>> and cache line misses at the cost of a simple code cleanup.
>>
>> Good catch. I haven't looked through the details yet, but I presume
>> this can be done on top of this changeset?
>
>Codewise the changes should be completely independent.
>
>
>
>Probably the trickiest bit is that drivers/xen/events.c calls handle_irq
>and makes handle_irq on ia64 a wrapper for __do_IRQ.
>
>Jeremy is there any good reason why drivers/xen/events.c does not just do:
>
>desc = irq_to_desc(irq);
>if (desc)
> generic_handle_irq_desc(irq, desc);
>
>And instead introduces a weird one-off xen specific multi-arch function?
>
>
>Eric
>

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.