WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] IRQ migration (c/s 20370 + 20465)

To: Jan Beulich <JBeulich@xxxxxxxxxx>, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Subject: RE: [Xen-devel] IRQ migration (c/s 20370 + 20465)
From: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
Date: Wed, 1 Dec 2010 14:08:51 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 30 Nov 2010 22:10:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4CF53A200200007800024F4D@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4CF3B55A0200007800024A99@xxxxxxxxxxxxxxxxxx> <4CF53A200200007800024F4D@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuQryv7kRFI11CdRrK3bThdaoqz2QAboAaQ
Thread-topic: [Xen-devel] IRQ migration (c/s 20370 + 20465)
Hi, Jan
    I think the patch is fine. In directed eoi case, the 
io_apic_level_ack_pending check should be always true before eoi_IO_APIC_irq is 
called , so move_masked_irq is never called and  no IRQ migration occurs.  
Xiantao

Jan Beulich wrote:
>>>> On 29.11.10 at 14:14, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:
>>>> Edwin, Xiantao, 
>> 
>> I'm observing I/O-APIC IRQs never getting migrated on a system
>> using directed EOI. Looking at end_level_ioapic_irq(), I fail
>> to see how that case is being handled (other than in the Linux
>> implementation, which this code supposedly is a clone of).
>> 
>> Additionally it seems wasteful to check whether to move the IRQ in
>> mask_and_ack_level_ioapic_irq(), as ack_APIC_irq() cannot
>> possibly have resulted in clearing any of the IRR bits that
>> io_apic_level_ack_pending() is looking at.
> 
> Below is a tentative (lightly tested) fix for this. Comments?
> 
> Jan
> 
> --- a/xen/arch/x86/io_apic.c
> +++ b/xen/arch/x86/io_apic.c
> @@ -1634,11 +1634,14 @@ static void mask_and_ack_level_ioapic_ir
> 
>      ack_APIC_irq();
> 
> +    if ( directed_eoi_enabled )
> +        return;
> +
>      if ((irq_desc[irq].status & IRQ_MOVE_PENDING) &&
>         !io_apic_level_ack_pending(irq))
> -        move_native_irq(irq);
> +        move_masked_irq(irq);
> 
> -    if (!directed_eoi_enabled && !(v & (1 << (i & 0x1f)))) {
> +    if ( !(v & (1 << (i & 0x1f))) ) {
>          atomic_inc(&irq_mis_count);
>          spin_lock(&ioapic_lock);
>          __edge_IO_APIC_irq(irq);
> @@ -1654,12 +1657,22 @@ static void end_level_ioapic_irq (unsign
> 
>      if ( !ioapic_ack_new )
>      {
> -        if ( irq_desc[irq].status & IRQ_DISABLED )
> -            return;
> -
>          if ( directed_eoi_enabled )
> +        {
> +            if ( !(irq_desc[irq].status &
> (IRQ_DISABLED|IRQ_MOVE_PENDING)) ) +            {
> +                eoi_IO_APIC_irq(irq);
> +                return;
> +            }
> +
> +            mask_IO_APIC_irq(irq);
>              eoi_IO_APIC_irq(irq);
> -        else
> +            if ( (irq_desc[irq].status & IRQ_MOVE_PENDING) &&
> +                 !io_apic_level_ack_pending(irq) )
> +                move_masked_irq(irq);
> +        }
> +
> +        if ( !(irq_desc[irq].status & IRQ_DISABLED) )
>              unmask_IO_APIC_irq(irq);
> 
>          return;


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>