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

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

 



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
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux