Re: [PATCH RFC 0/4] Paravirt-spinlock implementation for KVM guests (Version 0)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Monday, July 26, 2010 - 10:18 am

On 07/25/2010 11:11 PM, Srivatsa Vaddagiri wrote:

Excellent!  I think this problem has been ignored for too long.


No, that doesn't look like a good approach.  It suggests the apparently 
commonality isn't really there.


Did you see the patch series I posted a couple of weeks ago to revamp pv 
spinlocks?  Specifically, I dropped the notion of pv spinlocks in which 
the entire spinlock implementation is replaced, and added pv ticketlocks 
where the ticketlock algorithm is always used for the fastpath, but it 
calls out to pvop calls for the slowpath (a long spin, or unlocking a 
lock with waiters).  It significantly reduces the amount of 
hypervisor-specific code.

You can see the current patches in

    git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
    xen/pvticketlock-git




That's not actually the real problem.  It's *a* problem, but 
insignificant compared to the ticketlock-specific "next-in-line vcpu 
scheduler bunfight" problem - lock holder preemption is a misnomer.  
Fortunately the solutions to both are (nearly) the same.

See Thomas Friebel's talk "Prevent Guests from Spinning Around 
(http://www.xen.org/files/xensummitboston08/LHP.pdf).


This doesn't actually help the problem mentioned above, because it's not 
a problem with the lock holder getting preempted, but what happens once 
the lock has been released.


Those are consistent with the results I get too.

     J
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC 0/4] Paravirt-spinlock implementation for KVM g ..., Srivatsa Vaddagiri, (Sun Jul 25, 11:11 pm)
[PATCH RFC 1/4] Debugfs support for reading an array of u3 ..., Srivatsa Vaddagiri, (Sun Jul 25, 11:13 pm)
[PATCH RFC 2/4] Add yield hypercall for KVM guests, Srivatsa Vaddagiri, (Sun Jul 25, 11:14 pm)
[PATCH RFC 3/4] Paravirtualized spinlock implementation fo ..., Srivatsa Vaddagiri, (Sun Jul 25, 11:15 pm)
[PATCH RFC 4/4] Add yield hypercall support in Qemu, Srivatsa Vaddagiri, (Sun Jul 25, 11:16 pm)
Re: [PATCH RFC 0/4] Paravirt-spinlock implementation for K ..., Jeremy Fitzhardinge, (Mon Jul 26, 10:18 am)
Re: [PATCH RFC 2/4] Add yield hypercall for KVM guests, Jeremy Fitzhardinge, (Mon Jul 26, 10:19 am)
Re: [PATCH RFC 0/4] Paravirt-spinlock implementation for K ..., Srivatsa Vaddagiri, (Wed Jul 28, 7:47 am)
Re: [PATCH RFC 2/4] Add yield hypercall for KVM guests, Srivatsa Vaddagiri, (Wed Jul 28, 7:55 am)
Re: [PATCH RFC 0/4] Paravirt-spinlock implementation for K ..., Konrad Rzeszutek Wilk, (Wed Jul 28, 3:10 pm)
Re: [PATCH RFC 0/4] Paravirt-spinlock implementation for K ..., Konrad Rzeszutek Wilk, (Wed Jul 28, 3:42 pm)
Re: [PATCH RFC 2/4] Add yield hypercall for KVM guests, Jeremy Fitzhardinge, (Mon Aug 2, 8:08 am)
Re: [PATCH RFC 3/4] Paravirtualized spinlock implementatio ..., Jeremy Fitzhardinge, (Mon Aug 2, 8:20 am)
Re: [PATCH RFC 2/4] Add yield hypercall for KVM guests, Srivatsa Vaddagiri, (Mon Aug 2, 10:16 pm)
Re: [PATCH RFC 2/4] Add yield hypercall for KVM guests, Srivatsa Vaddagiri, (Mon Aug 2, 10:33 pm)
Re: [PATCH RFC 3/4] Paravirtualized spinlock implementatio ..., Jeremy Fitzhardinge, (Tue Aug 3, 10:47 am)