From: Jeremy Fitzhardinge Subject: Re: Xen spinlock questions Date: Tue, 12 Aug 2008 09:33:10 -0700 Message-ID: <48A1BB46.2080304@goop.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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 Keir Fraser wrote: > On 11/8/08 19:49, "Jeremy Fitzhardinge" wrote: > > >> Keir Fraser wrote: >> >>> That's right. The hypercall returns if any event is delivered to the vcpu, >>> or if any port in the poll set is pending. The fact we don't clear the vcpu >>> from the poll_mask if unblocked for event delivery isn't a correctness >>> issue, but it will cause unnecessary extra work in future invocations of >>> evtchn_set_pending(). Perhaps vcpu_unblock() should clear it. >>> >>> >> That seems reasonable. In this use-case, it's quite likely that if the >> poll is interrupted by event delivery, on return it will find that the >> spinlock is now free and never re-enter the poll. >> > > Attached is a new version of the patch which clears the vcpu from poll_mask > when it is unblocked for any reason. Jan: please can you give this one a > spin if you get time. > Forgot to attach? J