From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [Patch 2 of 2]: PV-domain SMP performance Linux-part Date: Fri, 16 Jan 2009 11:31:24 +0100 Message-ID: <497061FC.3090405@fujitsu-siemens.com> 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 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: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org James Harper wrote: > Juergen, > > Do you think your changes could be applicable to HVM domains with > appropriately patched kernel spinlock routines? Absolutely, yes. I'm doing this with our BS2000-port to x86/XEN, which is running as a HVM-domain using some PV-interfaces. > > 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. > > Does that approximate what you do? I'll re-read your patch, I seem to > remember something about borrowing time from Xen to keep the vcpu a > little longer if a spinlock was held, so maybe you are taking a > proactive approach to my reactive approach? Correct. I avoid losing the physical cpu in critical paths. In my case I've used my new interface always when asynchronous interrupts are disabled explicitly, as this is done always when entering critical code paths. Juergen -- Juergen Gross Principal Developer IP SW OS6 Telephone: +49 (0) 89 636 47950 Fujitsu Siemens Computers e-mail: juergen.gross@fujitsu-siemens.com Otto-Hahn-Ring 6 Internet: www.fujitsu-siemens.com D-81739 Muenchen Company details: www.fujitsu-siemens.com/imprint.html