From: Keir Fraser Subject: Re: RE: event delay issue on SMP machine when xen0 is SMPenabled Date: Sat, 10 Dec 2005 14:24:28 +0000 Message-ID: <3610081d168eebeb56c0216406768f27@cl.cam.ac.uk> References: <571ACEFD467F7749BC50E0A98C17CDD802C06A80@pdsmsx403> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <571ACEFD467F7749BC50E0A98C17CDD802C06A80@pdsmsx403> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Tian, Kevin" Cc: "Li, Xin B" , Ian Pratt , Xen Mailing List , Christian Limpach List-Id: xen-devel@lists.xenproject.org On 9 Dec 2005, at 08:59, Tian, Kevin wrote: >> I have a question on the following function, why l1 is updated only >> one >> time, while l2 is updated in each loop? I think they should handle in >> the same way. Anyway, in current code, l2 &= ~(1UL << l2i); is not >> needed. > > Does that mean in the middle of processing l2, some bits previously > active may become inactive due to unmasked by other vcpus? So > conservative check in each loop may be necessary. ;-) You can reenter evtchn_do_upcall() on the same CPU from within an IRQ handler that does not specify SA_INTERRUPT. It will then handle all the pending l2's and the saved l2 in your outer stack activation is now stale. You then end up double-executing IRQs occasionally which I think we found to be a bad thing in a few cases. -- Keir