Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-26 Thread Wanpeng Li
Hi Eduardo, 2017-11-16 12:54 GMT+08:00 Eduardo Valentin : > Hey Radim, > > On Thu, Nov 09, 2017 at 03:17:33PM +0100, Radim Krčmář wrote: > > > >> >> This is what I'm doubting, because the patch is adding about two >> thousand cycles to every spinlock-taken path. >> Doesn't this

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-26 Thread Wanpeng Li
Hi Eduardo, 2017-11-16 12:54 GMT+08:00 Eduardo Valentin : > Hey Radim, > > On Thu, Nov 09, 2017 at 03:17:33PM +0100, Radim Krčmář wrote: > > > >> >> This is what I'm doubting, because the patch is adding about two >> thousand cycles to every spinlock-taken path. >> Doesn't this patch yield better

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-15 Thread Eduardo Valentin
Hey Radim, On Thu, Nov 09, 2017 at 03:17:33PM +0100, Radim Krčmář wrote: > > This is what I'm doubting, because the patch is adding about two > thousand cycles to every spinlock-taken path. > Doesn't this patch yield better results? > > diff --git a/arch/x86/kernel/kvm.c

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-15 Thread Eduardo Valentin
Hey Radim, On Thu, Nov 09, 2017 at 03:17:33PM +0100, Radim Krčmář wrote: > > This is what I'm doubting, because the patch is adding about two > thousand cycles to every spinlock-taken path. > Doesn't this patch yield better results? > > diff --git a/arch/x86/kernel/kvm.c

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-10 Thread Paolo Bonzini
On 10/11/2017 07:07, Wanpeng Li wrote: >>> You should also add a cpuid flag in kvm part. >> It is better without that. The flag has no dependency on KVM (kernel >> hypervisor) code. > Do you mean -cpu host, +,I think it will result in "warning: host > doesn't support requested feature:

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-10 Thread Paolo Bonzini
On 10/11/2017 07:07, Wanpeng Li wrote: >>> You should also add a cpuid flag in kvm part. >> It is better without that. The flag has no dependency on KVM (kernel >> hypervisor) code. > Do you mean -cpu host, +,I think it will result in "warning: host > doesn't support requested feature:

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-10 Thread Wanpeng Li
2017-11-10 15:59 GMT+08:00 Peter Zijlstra : > On Fri, Nov 10, 2017 at 10:07:56AM +0800, Wanpeng Li wrote: > >> >> Also, you should not put cpumask_t on stack, that's 'broken'. >> >> Thanks pointing out this. I found a useful comments in arch/x86/kernel/irq.c: >> >> /* These

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-10 Thread Wanpeng Li
2017-11-10 15:59 GMT+08:00 Peter Zijlstra : > On Fri, Nov 10, 2017 at 10:07:56AM +0800, Wanpeng Li wrote: > >> >> Also, you should not put cpumask_t on stack, that's 'broken'. >> >> Thanks pointing out this. I found a useful comments in arch/x86/kernel/irq.c: >> >> /* These two declarations are

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Peter Zijlstra
On Fri, Nov 10, 2017 at 10:07:56AM +0800, Wanpeng Li wrote: > >> Also, you should not put cpumask_t on stack, that's 'broken'. > > Thanks pointing out this. I found a useful comments in arch/x86/kernel/irq.c: > > /* These two declarations are only used in check_irq_vectors_for_cpu_disable() >

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Peter Zijlstra
On Fri, Nov 10, 2017 at 10:07:56AM +0800, Wanpeng Li wrote: > >> Also, you should not put cpumask_t on stack, that's 'broken'. > > Thanks pointing out this. I found a useful comments in arch/x86/kernel/irq.c: > > /* These two declarations are only used in check_irq_vectors_for_cpu_disable() >

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Wanpeng Li
2017-11-10 0:00 GMT+08:00 Radim Krcmar : > 2017-11-09 20:43+0800, Wanpeng Li: >> 2017-11-07 4:26 GMT+08:00 Eduardo Valentin : >> > Currently, the existing qspinlock implementation will fallback to >> > test-and-set if the hypervisor has not set the PV_UNHALT

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Wanpeng Li
2017-11-10 0:00 GMT+08:00 Radim Krcmar : > 2017-11-09 20:43+0800, Wanpeng Li: >> 2017-11-07 4:26 GMT+08:00 Eduardo Valentin : >> > Currently, the existing qspinlock implementation will fallback to >> > test-and-set if the hypervisor has not set the PV_UNHALT flag. >> > >> > This patch gives the

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Wanpeng Li
2017-11-10 1:15 GMT+08:00 Peter Zijlstra : > On Thu, Nov 09, 2017 at 06:12:41PM +0100, Peter Zijlstra wrote: >> On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: >> > 2017-11-09 17:17+0100, Peter Zijlstra: >> > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Wanpeng Li
2017-11-10 1:15 GMT+08:00 Peter Zijlstra : > On Thu, Nov 09, 2017 at 06:12:41PM +0100, Peter Zijlstra wrote: >> On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: >> > 2017-11-09 17:17+0100, Peter Zijlstra: >> > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: >> > > >

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krcmar
2017-11-09 18:12+0100, Peter Zijlstra: > On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: > > 2017-11-09 17:17+0100, Peter Zijlstra: > > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > > > 2] PV TLB should also behave

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krcmar
2017-11-09 18:12+0100, Peter Zijlstra: > On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: > > 2017-11-09 17:17+0100, Peter Zijlstra: > > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > > > 2] PV TLB should also behave

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krcmar
2017-11-09 18:28+0100, Peter Zijlstra: > On Thu, Nov 09, 2017 at 06:15:11PM +0100, Peter Zijlstra wrote: > > On Thu, Nov 09, 2017 at 06:12:41PM +0100, Peter Zijlstra wrote: > > > On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: > > > > 2017-11-09 17:17+0100, Peter Zijlstra: > > > > >

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krcmar
2017-11-09 18:28+0100, Peter Zijlstra: > On Thu, Nov 09, 2017 at 06:15:11PM +0100, Peter Zijlstra wrote: > > On Thu, Nov 09, 2017 at 06:12:41PM +0100, Peter Zijlstra wrote: > > > On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: > > > > 2017-11-09 17:17+0100, Peter Zijlstra: > > > > >

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Peter Zijlstra
On Thu, Nov 09, 2017 at 06:15:11PM +0100, Peter Zijlstra wrote: > On Thu, Nov 09, 2017 at 06:12:41PM +0100, Peter Zijlstra wrote: > > On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: > > > 2017-11-09 17:17+0100, Peter Zijlstra: > > > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Peter Zijlstra
On Thu, Nov 09, 2017 at 06:15:11PM +0100, Peter Zijlstra wrote: > On Thu, Nov 09, 2017 at 06:12:41PM +0100, Peter Zijlstra wrote: > > On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: > > > 2017-11-09 17:17+0100, Peter Zijlstra: > > > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Peter Zijlstra
On Thu, Nov 09, 2017 at 06:12:41PM +0100, Peter Zijlstra wrote: > On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: > > 2017-11-09 17:17+0100, Peter Zijlstra: > > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > > > 2]

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Peter Zijlstra
On Thu, Nov 09, 2017 at 06:12:41PM +0100, Peter Zijlstra wrote: > On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: > > 2017-11-09 17:17+0100, Peter Zijlstra: > > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > > > 2]

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Peter Zijlstra
On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: > 2017-11-09 17:17+0100, Peter Zijlstra: > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > > 2] PV TLB should also behave as per option PV_DEDICATED for better > > > >

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Peter Zijlstra
On Thu, Nov 09, 2017 at 05:45:23PM +0100, Radim Krcmar wrote: > 2017-11-09 17:17+0100, Peter Zijlstra: > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > > 2] PV TLB should also behave as per option PV_DEDICATED for better > > > >

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krcmar
2017-11-09 17:17+0100, Peter Zijlstra: > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > 2] PV TLB should also behave as per option PV_DEDICATED for better > > > performance. > > > > Right, > > Shouldn't KVM do flush_tlb_other() in

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krcmar
2017-11-09 17:17+0100, Peter Zijlstra: > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > 2] PV TLB should also behave as per option PV_DEDICATED for better > > > performance. > > > > Right, > > Shouldn't KVM do flush_tlb_other() in

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Pankaj Gupta
> Subject: Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when > PV_DEDICATED is set > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > 2] PV TLB should also behave as per option PV_DEDICATED f

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Pankaj Gupta
> Subject: Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when > PV_DEDICATED is set > > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > 2] PV TLB should also behave as per option PV_DEDICATED f

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Peter Zijlstra
On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > 2017-11-09 10:53-0500, Pankaj Gupta: > > 2] PV TLB should also behave as per option PV_DEDICATED for better > > performance. > > Right, Shouldn't KVM do flush_tlb_other() in any case? Not sure how PV_DEDICATED can help with that.

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Peter Zijlstra
On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > 2017-11-09 10:53-0500, Pankaj Gupta: > > 2] PV TLB should also behave as per option PV_DEDICATED for better > > performance. > > Right, Shouldn't KVM do flush_tlb_other() in any case? Not sure how PV_DEDICATED can help with that.

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krcmar
2017-11-09 10:53-0500, Pankaj Gupta: > > > > 2017-11-07 4:26 GMT+08:00 Eduardo Valentin : > > > Currently, the existing qspinlock implementation will fallback to > > > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > > > > > This patch gives the opportunity

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krcmar
2017-11-09 10:53-0500, Pankaj Gupta: > > > > 2017-11-07 4:26 GMT+08:00 Eduardo Valentin : > > > Currently, the existing qspinlock implementation will fallback to > > > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > > > > > This patch gives the opportunity to guest kernels to

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krcmar
2017-11-09 20:43+0800, Wanpeng Li: > 2017-11-07 4:26 GMT+08:00 Eduardo Valentin : > > Currently, the existing qspinlock implementation will fallback to > > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > > > This patch gives the opportunity to guest kernels to

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krcmar
2017-11-09 20:43+0800, Wanpeng Li: > 2017-11-07 4:26 GMT+08:00 Eduardo Valentin : > > Currently, the existing qspinlock implementation will fallback to > > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > > > This patch gives the opportunity to guest kernels to select > > between

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Pankaj Gupta
> 2017-11-07 4:26 GMT+08:00 Eduardo Valentin : > > Currently, the existing qspinlock implementation will fallback to > > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > > > This patch gives the opportunity to guest kernels to select > > between test-and-set

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Pankaj Gupta
> 2017-11-07 4:26 GMT+08:00 Eduardo Valentin : > > Currently, the existing qspinlock implementation will fallback to > > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > > > This patch gives the opportunity to guest kernels to select > > between test-and-set and the regular

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krčmář
2017-11-09 00:55-0800, Eduardo Valentin: > Hello, > > On Wed, Nov 08, 2017 at 06:36:52PM +0100, Radim Krčmář wrote: > > 2017-11-06 12:26-0800, Eduardo Valentin: > > > Currently, the existing qspinlock implementation will fallback to > > > test-and-set if the hypervisor has not set the PV_UNHALT

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Radim Krčmář
2017-11-09 00:55-0800, Eduardo Valentin: > Hello, > > On Wed, Nov 08, 2017 at 06:36:52PM +0100, Radim Krčmář wrote: > > 2017-11-06 12:26-0800, Eduardo Valentin: > > > Currently, the existing qspinlock implementation will fallback to > > > test-and-set if the hypervisor has not set the PV_UNHALT

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Wanpeng Li
2017-11-07 4:26 GMT+08:00 Eduardo Valentin : > Currently, the existing qspinlock implementation will fallback to > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > This patch gives the opportunity to guest kernels to select > between test-and-set and the

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Wanpeng Li
2017-11-07 4:26 GMT+08:00 Eduardo Valentin : > Currently, the existing qspinlock implementation will fallback to > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > This patch gives the opportunity to guest kernels to select > between test-and-set and the regular queueu fair lock

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Eduardo Valentin
Hello, On Wed, Nov 08, 2017 at 06:36:52PM +0100, Radim Krčmář wrote: > 2017-11-06 12:26-0800, Eduardo Valentin: > > Currently, the existing qspinlock implementation will fallback to > > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > > > This patch gives the opportunity to

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-09 Thread Eduardo Valentin
Hello, On Wed, Nov 08, 2017 at 06:36:52PM +0100, Radim Krčmář wrote: > 2017-11-06 12:26-0800, Eduardo Valentin: > > Currently, the existing qspinlock implementation will fallback to > > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > > > This patch gives the opportunity to

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-08 Thread Radim Krčmář
2017-11-06 12:26-0800, Eduardo Valentin: > Currently, the existing qspinlock implementation will fallback to > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > This patch gives the opportunity to guest kernels to select > between test-and-set and the regular queueu fair lock

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-08 Thread Radim Krčmář
2017-11-06 12:26-0800, Eduardo Valentin: > Currently, the existing qspinlock implementation will fallback to > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > This patch gives the opportunity to guest kernels to select > between test-and-set and the regular queueu fair lock

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-08 Thread Eduardo Valentin
Paolo, On Tue, Nov 07, 2017 at 01:43:15PM +0100, Paolo Bonzini wrote: > On 07/11/2017 13:39, Eduardo Valentin wrote: > >> is this still needed after Waiman's patch to adaptively switch between > >> tas and pvqspinlock? > > Can you please point me to it ? Is it already in tip/master? > > > > No,

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-08 Thread Eduardo Valentin
Paolo, On Tue, Nov 07, 2017 at 01:43:15PM +0100, Paolo Bonzini wrote: > On 07/11/2017 13:39, Eduardo Valentin wrote: > >> is this still needed after Waiman's patch to adaptively switch between > >> tas and pvqspinlock? > > Can you please point me to it ? Is it already in tip/master? > > > > No,

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-07 Thread Paolo Bonzini
On 07/11/2017 13:39, Eduardo Valentin wrote: >> is this still needed after Waiman's patch to adaptively switch between >> tas and pvqspinlock? > Can you please point me to it ? Is it already in tip/master? > No, he just posted it: https://marc.info/?l=linux-kernel=150972337909996=2 Paolo

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-07 Thread Paolo Bonzini
On 07/11/2017 13:39, Eduardo Valentin wrote: >> is this still needed after Waiman's patch to adaptively switch between >> tas and pvqspinlock? > Can you please point me to it ? Is it already in tip/master? > No, he just posted it: https://marc.info/?l=linux-kernel=150972337909996=2 Paolo

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-07 Thread Eduardo Valentin
On Tue, Nov 07, 2017 at 01:23:56PM +0100, Paolo Bonzini wrote: > On 06/11/2017 21:26, Eduardo Valentin wrote: > > Currently, the existing qspinlock implementation will fallback to > > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > > > This patch gives the opportunity to guest

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-07 Thread Eduardo Valentin
On Tue, Nov 07, 2017 at 01:23:56PM +0100, Paolo Bonzini wrote: > On 06/11/2017 21:26, Eduardo Valentin wrote: > > Currently, the existing qspinlock implementation will fallback to > > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > > > This patch gives the opportunity to guest

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-07 Thread Paolo Bonzini
On 06/11/2017 21:26, Eduardo Valentin wrote: > Currently, the existing qspinlock implementation will fallback to > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > This patch gives the opportunity to guest kernels to select > between test-and-set and the regular queueu fair lock

Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-07 Thread Paolo Bonzini
On 06/11/2017 21:26, Eduardo Valentin wrote: > Currently, the existing qspinlock implementation will fallback to > test-and-set if the hypervisor has not set the PV_UNHALT flag. > > This patch gives the opportunity to guest kernels to select > between test-and-set and the regular queueu fair lock

[PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-06 Thread Eduardo Valentin
Currently, the existing qspinlock implementation will fallback to test-and-set if the hypervisor has not set the PV_UNHALT flag. This patch gives the opportunity to guest kernels to select between test-and-set and the regular queueu fair lock implementation based on the PV_DEDICATED KVM feature

[PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-06 Thread Eduardo Valentin
Currently, the existing qspinlock implementation will fallback to test-and-set if the hypervisor has not set the PV_UNHALT flag. This patch gives the opportunity to guest kernels to select between test-and-set and the regular queueu fair lock implementation based on the PV_DEDICATED KVM feature