From: Keir Fraser Subject: Re: Xen spinlock questions Date: Mon, 18 Aug 2008 11:01:52 +0100 Message-ID: References: <48A5A98F.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <48A5A98F.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: Jeremy Fitzhardinge , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 15/8/08 15:06, "Jan Beulich" wrote: >>> I can't really explain the results of testing with this version of the >>> patch: >>> While the number of false wakeups got further reduced by somewhat >>> less than 20%, both time spent in the kernel and total execution time >>> went up (8% and 4% respectively) compared to my original (and from >>> all I can tell worse) version of the patch. Nothing else changed as far as >>> I'm aware. >> >> That is certainly odd. Presumably consistent across a few runs? I can't >> imagine where extra time would be being spent though... > > Yes, I did at least five runs in each environment. It might be worth retrying with the vcpu_unblock() changes removed. It'll still work, but poll_mask may have bits spuriously left set for arbitrary time periods. However, vcpu_unblock() is the only thing I obviously make more expensive than in your patch. We could also possibly make the vcpu_unblock() check cheaper by testing v->poll_evtchn for non-zero, and zero it, and clear from poll_mask. Reading a vcpu-local field may be cheaper than getting access to a domain struct cache line. -- Keir