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

[Xen-devel] Re: [PATCH] xen: do not clear and mask evtchns in __xen_evtc

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] xen: do not clear and mask evtchns in __xen_evtchn_do_upcall
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Tue, 5 Apr 2011 12:19:27 +0100
Cc: Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Tue, 05 Apr 2011 04:19:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110404171739.GA15070@xxxxxxxxxxxx>
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: <alpine.DEB.2.00.1103291505090.16492@kaball-desktop> <20110330154630.GA17427@xxxxxxxxxxxx> <alpine.DEB.2.00.1104041521370.16492@kaball-desktop> <20110404171739.GA15070@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Mon, 4 Apr 2011, Konrad Rzeszutek Wilk wrote:
> > I reworded this part of the commit message, see below updated patch.
> > 
> [looking]
> .. snip..
> > > Can you expand? As in for the GSI? Or for the MSI/MSI-X?
> > 
> > Linux on native would use handle_edge_irq for edge irqs and msis, and
> > handle_fasteoi_irq for everything else.
> 
> What about per_cpu one?
> 

That is the simplest case, we are already using the same semantic as in
the native code.


> > > OK. You need a big comment about this in the code. Explain
> > > why this is happening. B/c if you look at this from code
> > > it seems like wrong thing to do for gsi's (as in you would
> > > think handle_level_irq would the right choice).
> > 
> > Except handle_level_irq is not used anymore anywhere in the kernel, give
> > a look at arch/x86/kernel/apic/io_apic.c:ioapic_register_intr.
> 
> 'make_8259A_irq' ? But yeah, I don't think we will hit machines with
> that architecture anymore.

Actually I was looking at:

setup_IO_APIC_irqs -> __io_apic_setup_irqs -> io_apic_setup_irq_pin



> > Updated patch, rebased on 2.6.39-rc1 follows:
> > 
> > ---
> > 
> > 
> > commit 6978531913b45abf3aff048475a2174a2cdaf288
> > Author: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> > Date:   Tue Mar 29 14:15:06 2011 +0000
> > 
> >     xen: do not clear and mask evtchns in __xen_evtchn_do_upcall
> >     
> >     Change the irq handler of virqs and pirqs that don't need EOI (pirqs
> >     that correspond to physical edge interrupts) to handle_edge_irq.
> >     
> >     Use handle_fasteoi_irq for pirqs that need eoi (they generally
> >     correspond to level triggered irqs), no risk in loosing interrupts
> >     because we have to EOI the irq anyway.
> >     
> >     This change has the following benefits:
> >     
> >     - it uses the very same handlers that Linux would use on native for the
> >     same irqs (handle_edge_irq for edge irqs and msis, and
>                                                    ^^^-'MSIs/MSI-Xs'
> >     handle_fasteoi_irq for everything else);
> >     
> >     - it uses these handlers in the same way Linux would use them: it let
>                                                                            ^- 
> 's'
> 
> >     Linux mask\unmask and ack the irq when Linux want to mask\unmask and ack
>                                                        ^- 's'
> >     the irq;
> >     
> >     See genericirq in the kernel docbook docs for more informations.
> 
> Say 'Documentation/DocBook/genericirq.tmpl'
> 
> [edit: The patch looks OK to me, but let me think about this some more over 
> this
> week and sketch out the flow].

done


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