From: "Jan Beulich" Subject: Re: [Patch] don't spin with irq disabled Date: Thu, 26 Mar 2009 12:23:14 +0000 Message-ID: <49CB81C2.76E4.0078.0@novell.com> References: <49CB441E.9030006@fujitsu-siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <49CB441E.9030006@fujitsu-siemens.com> 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: Juergen Gross Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org >>> Juergen Gross 26.03.09 10:00 >>> >Attached patch reduces interrupt latency in lock handling. >spin_lock_irq and spin_lock_irqsave used to turn off IRQs and then tried = to >get the lock. If the lock was already held, waiting for the lock was done = with >IRQs still off. >The patch reenables IRQs during the wait loop. This is wrong - you must not enable interrupts if they weren't enabled = upon entry to these two functions. Jan