[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [Patch 2 of 2]: PV-domain SMP performance Linux-part



'enlightened' windows OSs have SpinLock routines that make a hypercall
to yield CPU to another VM.  So if you comply with the windows
hypervisor spec, you can get a performance boost when virtualized.  This
doesn't help you out with Pre - vista versions though...  Look at the
disassembly for KfAcquireSpinLock.

-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of James Harper
Sent: Friday, January 16, 2009 6:02 AM
To: Keir Fraser; Juergen Gross; Venefax
Cc: George Dunlap; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] [Patch 2 of 2]: PV-domain SMP performance
Linux-part

> On 16/01/2009 10:16, "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
wrote:
> 
> > 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.
> 
> That's a lot more like our existing Linux pv_ops spinlock handling
> (yield/block instead of spin) than Juergen's patch (don't deschedule
me
> while in a critical section). The difference from what you suggest is
that
> we heuristically detect unscheduled lock holders by spinning a short
> while.
> 
> You can pv up your Windows spinlocks in the block-instead-of-spin way
> already (and yield-instead-of-spin is obviously even easier).
> 

But only in spinlocks that I 'own' completely right? I'm more concerned
about spinlocks that I share with Windows (eg in NDIS).

James

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.