From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [Patch 2 of 2]: PV-domain SMP performance Linux-part Date: Fri, 16 Jan 2009 09:43:34 -0800 Message-ID: <4970C746.7000101@goop.org> References: <4970344D.7030009@fujitsu-siemens.com><059f01c977ad$5e40c380$1ac24a80$@com> <49703BDB.4090805@fujitsu-siemens.com> 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: James Harper Cc: George Dunlap , Juergen Gross , Keir Fraser , xen-devel@lists.xensource.com, Venefax List-Id: xen-devel@lists.xenproject.org James Harper wrote: > Do you think your changes could be applicable to HVM domains with > appropriately patched kernel spinlock routines? > > I had previously wondered about optimizing spinlocks, my idea was > basically for Xen to set a bit in a structure to indicate what vcpus are > currently scheduled, and my modified spinlock acquire routine would > check if the current vcpu wants a spinlock that is held by a currently > unscheduled vcpu, and if so yield to Xen to let the other vcpu schedule. > > The only thing I would need from Xen is to know which vcpus were > currently scheduled, the rest would be DomU based. > In a PV domain you can already get that information from the runstate_info structure, which can be mapped into the domain's memory and just read directly. I don't know if its available to an hvm domain, but I don't think it would be hard to implement if it isn't. J