Displaying 7 results from an estimated 7 matches for "locktype_paravirt".
2017 Nov 01
2
[PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
...ndex 12deec7..941a046 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -690,6 +690,15 @@ static __always_inline bool pv_vcpu_is_preempted(long cpu)
#endif /* SMP && PARAVIRT_SPINLOCKS */
+enum pv_spinlock_type {
+ locktype_auto,
+ locktype_queued,
+ locktype_paravirt,
+ locktype_unfair,
+};
+
+extern enum pv_spinlock_type pv_spinlock_type;
+
#ifdef CONFIG_X86_32
#define PV_SAVE_REGS "pushl %ecx; pushl %edx;"
#define PV_RESTORE_REGS "popl %edx; popl %ecx;"
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 8bb9594..3a5d3ec4 1...
2017 Nov 01
2
[PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
...ndex 12deec7..941a046 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -690,6 +690,15 @@ static __always_inline bool pv_vcpu_is_preempted(long cpu)
#endif /* SMP && PARAVIRT_SPINLOCKS */
+enum pv_spinlock_type {
+ locktype_auto,
+ locktype_queued,
+ locktype_paravirt,
+ locktype_unfair,
+};
+
+extern enum pv_spinlock_type pv_spinlock_type;
+
#ifdef CONFIG_X86_32
#define PV_SAVE_REGS "pushl %ecx; pushl %edx;"
#define PV_RESTORE_REGS "popl %edx; popl %ecx;"
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 8bb9594..3a5d3ec4 1...
2017 Nov 01
0
[PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
...nclude/asm/paravirt.h
> +++ b/arch/x86/include/asm/paravirt.h
> @@ -690,6 +690,15 @@ static __always_inline bool pv_vcpu_is_preempted(long cpu)
>
> #endif /* SMP && PARAVIRT_SPINLOCKS */
>
> +enum pv_spinlock_type {
> + locktype_auto,
> + locktype_queued,
> + locktype_paravirt,
> + locktype_unfair,
> +};
> +
> +extern enum pv_spinlock_type pv_spinlock_type;
> +
> #ifdef CONFIG_X86_32
> #define PV_SAVE_REGS "pushl %ecx; pushl %edx;"
> #define PV_RESTORE_REGS "popl %edx; popl %ecx;"
> diff --git a/arch/x86/kernel/kvm.c b/ar...
2017 Nov 01
3
[PATCH-tip v2 0/2] x86/paravirt: Enable users to choose PV lock type
v1->v2:
- Make pv_spinlock_type a bit mask for easier checking.
- Add patch 2 to deprecate xen_nopvspin
v1 - https://lkml.org/lkml/2017/11/1/381
Patch 1 adds a new pvlock_type parameter for the administrators to
specify the type of lock to be used in a para-virtualized kernel.
Patch 2 deprecates Xen's xen_nopvspin parameter as it is no longer
needed.
Waiman Long (2):
x86/paravirt:
2017 Nov 01
3
[PATCH-tip v2 0/2] x86/paravirt: Enable users to choose PV lock type
v1->v2:
- Make pv_spinlock_type a bit mask for easier checking.
- Add patch 2 to deprecate xen_nopvspin
v1 - https://lkml.org/lkml/2017/11/1/381
Patch 1 adds a new pvlock_type parameter for the administrators to
specify the type of lock to be used in a para-virtualized kernel.
Patch 2 deprecates Xen's xen_nopvspin parameter as it is no longer
needed.
Waiman Long (2):
x86/paravirt:
2017 Nov 01
2
[PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
...URE_HYPERVISOR))
>> + if (pv_spinlock_type == locktype_unfair)
>> + return;
>> +
>> + if (!static_cpu_has(X86_FEATURE_HYPERVISOR) ||
>> + (pv_spinlock_type != locktype_auto))
>> static_branch_disable(&virt_spin_lock_key);
> Really? I don't think locktype_paravirt should disable the static key.
With paravirt spinlock, it doesn't matter if the static key is disabled
or not. Without CONFIG_PARAVIRT_SPINLOCKS, however, it does degenerate
into the native qspinlock. So you are right, I should check for paravirt
type as well.
Cheers,
Longman
2017 Nov 01
2
[PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
...URE_HYPERVISOR))
>> + if (pv_spinlock_type == locktype_unfair)
>> + return;
>> +
>> + if (!static_cpu_has(X86_FEATURE_HYPERVISOR) ||
>> + (pv_spinlock_type != locktype_auto))
>> static_branch_disable(&virt_spin_lock_key);
> Really? I don't think locktype_paravirt should disable the static key.
With paravirt spinlock, it doesn't matter if the static key is disabled
or not. Without CONFIG_PARAVIRT_SPINLOCKS, however, it does degenerate
into the native qspinlock. So you are right, I should check for paravirt
type as well.
Cheers,
Longman