Paolo Bonzini
2014-Mar-13 13:59 UTC
[PATCH RFC v6 10/11] pvqspinlock, x86: Enable qspinlock PV support for KVM
Il 12/03/2014 19:54, Waiman Long ha scritto:> @@ -807,8 +889,13 @@ void __init kvm_spinlock_init(void) > if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) > return; > > +#ifdef CONFIG_QUEUE_SPINLOCK > + pv_lock_ops.kick_cpu = kvm_kick_cpu_type; > + pv_lock_ops.hibernate = kvm_hibernate; > +#else > pv_lock_ops.lock_spinning = PV_CALLEE_SAVE(kvm_lock_spinning); > pv_lock_ops.unlock_kick = kvm_unlock_kick; > +#endifThis should also disable the unfair path. Paolo
Waiman Long
2014-Mar-13 19:13 UTC
[PATCH RFC v6 10/11] pvqspinlock, x86: Enable qspinlock PV support for KVM
On 03/13/2014 09:59 AM, Paolo Bonzini wrote:> Il 12/03/2014 19:54, Waiman Long ha scritto: >> @@ -807,8 +889,13 @@ void __init kvm_spinlock_init(void) >> if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) >> return; >> >> +#ifdef CONFIG_QUEUE_SPINLOCK >> + pv_lock_ops.kick_cpu = kvm_kick_cpu_type; >> + pv_lock_ops.hibernate = kvm_hibernate; >> +#else >> pv_lock_ops.lock_spinning = PV_CALLEE_SAVE(kvm_lock_spinning); >> pv_lock_ops.unlock_kick = kvm_unlock_kick; >> +#endif > > This should also disable the unfair path. > > Paolo >The unfair lock uses a different jump label and does not require any special PV ops. There is a separate init function for that. -Longman
Paolo Bonzini
2014-Mar-14 08:42 UTC
[PATCH RFC v6 10/11] pvqspinlock, x86: Enable qspinlock PV support for KVM
Il 13/03/2014 20:13, Waiman Long ha scritto:>>> >> >> This should also disable the unfair path. >> >> Paolo >> > > The unfair lock uses a different jump label and does not require any > special PV ops. There is a separate init function for that.Yeah, what I mean is that the patches that enable paravirtualization should also take care of decreasing the unfair-lock jump label when paravirtualization is enabled. Paolo
Possibly Parallel Threads
- [PATCH RFC v6 10/11] pvqspinlock, x86: Enable qspinlock PV support for KVM
- [PATCH RFC v6 10/11] pvqspinlock, x86: Enable qspinlock PV support for KVM
- [PATCH RFC v6 10/11] pvqspinlock, x86: Enable qspinlock PV support for KVM
- [PATCH v6 05/11] pvqspinlock, x86: Allow unfair spinlock in a PV guest
- [PATCH v6 05/11] pvqspinlock, x86: Allow unfair spinlock in a PV guest