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

Re: [Xen-devel] [PATCH RFC v5 8/8] pvqspinlock, x86: Enable KVM to use qspinlock's PV support



On 02/27/2014 04:31 AM, Paolo Bonzini wrote:
  static __init int kvm_spinlock_init_jump(void)
diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks
index f185584..a70fdeb 100644
--- a/kernel/Kconfig.locks
+++ b/kernel/Kconfig.locks
@@ -229,4 +229,4 @@ config ARCH_USE_QUEUE_SPINLOCK

  config QUEUE_SPINLOCK
        def_bool y if ARCH_USE_QUEUE_SPINLOCK
-       depends on SMP&&  !PARAVIRT_SPINLOCKS
+       depends on SMP&&  (!PARAVIRT_SPINLOCKS || !XEN)

Should this rather be

     def_bool y if ARCH_USE_QUEUE_SPINLOCK&&  (!PARAVIRT_SPINLOCKS || !XEN)

?

PARAVIRT_SPINLOCKS + XEN + QUEUE_SPINLOCK + PARAVIRT_UNFAIR_LOCKS is a
valid combination, but it's impossible to choose PARAVIRT_UNFAIR_LOCKS
if QUEUE_SPINLOCK is unavailable.

Paolo

The PV ticketlock code assumes the presence of ticket spinlock. So it will cause compilation error if QUEUE_SPINLOCK is enabled. My patches 7/8 modified the KVM code so that the PV ticketlock code can coexist with queue spinlock. As I haven't figure out the proper way to modify the Xen code, I need to disable the queue spinlock code if PARAVIRT_SPINLOCKS and XEN are both enabled. However, by disabling PARAVIRT_SPINLOCKS, we can use PARAVIRT_UNFAIR_LOCKS with XEN.

-Longman

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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