search for: pv_spinlock_type

Displaying 11 results from an estimated 11 matches for "pv_spinlock_type".

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 paramet...
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 paramet...
2017 Nov 01
2
[PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
...nclude/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 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/kern...
2017 Nov 01
2
[PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
...nclude/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 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/kern...
2017 Nov 01
0
[PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
.../asm/paravirt.h > index 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 &quot...
2017 Nov 01
0
[PATCH-tip v2 2/2] x86/xen: Deprecate xen_nopvspin
.../spinlock.c @@ -20,7 +20,6 @@ static DEFINE_PER_CPU(int, lock_kicker_irq) = -1; static DEFINE_PER_CPU(char *, irq_name); -static bool xen_pvspin = true; #include <asm/qspinlock.h> @@ -81,12 +80,8 @@ void xen_init_lock_cpu(int cpu) int irq; char *name; - if (!xen_pvspin || - (pv_spinlock_type & (locktype_queued|locktype_unfair))) { - if ((cpu == 0) && !pv_spinlock_type) - static_branch_disable(&virt_spin_lock_key); + if (pv_spinlock_type & (locktype_queued|locktype_unfair)) return; - } WARN(per_cpu(lock_kicker_irq, cpu) >= 0, "spinlock on CPU%d exis...
2017 Nov 01
2
[PATCH-tip v2 2/2] x86/xen: Deprecate xen_nopvspin
...7 04:58 PM, Waiman Long wrote: > +/* TODO: To be removed in a future kernel version */ > static __init int xen_parse_nopvspin(char *arg) > { > - xen_pvspin = false; > + pr_warn("xen_nopvspin is deprecated, replace it with \"pvlock_type=queued\"!\n"); > + if (!pv_spinlock_type) > + pv_spinlock_type = locktype_queued; Since we currently end up using unfair locks and because you are deprecating xen_nopvspin I wonder whether it would be better to set this to locktype_unfair so that current behavior doesn't change. (Sorry, I haven't responded to your earlier mes...
2017 Nov 01
2
[PATCH-tip v2 2/2] x86/xen: Deprecate xen_nopvspin
...7 04:58 PM, Waiman Long wrote: > +/* TODO: To be removed in a future kernel version */ > static __init int xen_parse_nopvspin(char *arg) > { > - xen_pvspin = false; > + pr_warn("xen_nopvspin is deprecated, replace it with \"pvlock_type=queued\"!\n"); > + if (!pv_spinlock_type) > + pv_spinlock_type = locktype_queued; Since we currently end up using unfair locks and because you are deprecating xen_nopvspin I wonder whether it would be better to set this to locktype_unfair so that current behavior doesn't change. (Sorry, I haven't responded to your earlier mes...
2017 Nov 02
0
[PATCH-tip v2 2/2] x86/xen: Deprecate xen_nopvspin
...wrote: >> +/* TODO: To be removed in a future kernel version */ >> static __init int xen_parse_nopvspin(char *arg) >> { >> - xen_pvspin = false; >> + pr_warn("xen_nopvspin is deprecated, replace it with \"pvlock_type=queued\"!\n"); >> + if (!pv_spinlock_type) >> + pv_spinlock_type = locktype_queued; > Since we currently end up using unfair locks and because you are > deprecating xen_nopvspin I wonder whether it would be better to set this > to locktype_unfair so that current behavior doesn't change. (Sorry, I > haven't respon...
2017 Nov 01
2
[PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
...t think we need xen_nopvspin, but I don't want to remove that without agreement from the community. >> DEFINE_STATIC_KEY_TRUE(virt_spin_lock_key); >> >> void __init native_pv_lock_init(void) >> { >> - if (!static_cpu_has(X86_FEATURE_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....
2017 Nov 01
2
[PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
...t think we need xen_nopvspin, but I don't want to remove that without agreement from the community. >> DEFINE_STATIC_KEY_TRUE(virt_spin_lock_key); >> >> void __init native_pv_lock_init(void) >> { >> - if (!static_cpu_has(X86_FEATURE_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....