From: Keir Fraser Subject: Re: Xen spinlock questions Date: Mon, 11 Aug 2008 19:31:14 +0100 Message-ID: References: <48A080C7.4010003@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <48A080C7.4010003@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 11/8/08 19:11, "Jeremy Fitzhardinge" wrote: > Keir Fraser wrote: >> Could you try with the attached lock-free patch? >> > > Just to confirm: this will definitely cause SCHED_poll to return if any > event is delivered to the polling vcpu, right? It won't restart the > poll after event delivery? 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. -- Keir