From: "Jan Beulich" Subject: Re: [PATCH] assign_irq_vector adjustments Date: Thu, 13 Apr 2006 18:03:44 +0200 Message-ID: <443E9280.76E4.0078.0@novell.com> References: <443E836F.76E4.0078.0@novell.com> <5b3c46856fdc6415404b75d21375c3d8@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5b3c46856fdc6415404b75d21375c3d8@cl.cam.ac.uk> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >> In both i386 and x86-64 Linux, using a static variable (and thus >> having the potential of missing synchronization there, >> as I suspect exists in native Linux) is not needed with the hypercall >> approach. In the hypervisor, the patch adds the >> needed synchronization. > >1. Should you not assign to irq_vector[] and vector_irq[] in Xen with >the lock held? Otherwise you may double-allocate if two requests are >made concurrently to assign for the same irq (unlikely, but...) Hmm, the vector_irq assignment shouldn't need the lock (which is why I moved the unlock up), but you're right, the IO_APIC_VECTOR() write *and* read should happen with the lock held. I'll update that. >2. Since that'll need a re-send, please also add a Signed-off-by line. Sure, if you prefer it that way. Should this go into the patch (attachment) or the message? Jan