mbox series

[v8,0/5] Add a unified parameter "nopvspin"

Message ID 1571829384-5309-1-git-send-email-zhenzhong.duan@oracle.com (mailing list archive)
Headers show
Series Add a unified parameter "nopvspin" | expand

Message

Zhenzhong Duan Oct. 23, 2019, 11:16 a.m. UTC
There are cases folks want to disable spinlock optimization for
debug/test purpose. Xen and hyperv already have parameters "xen_nopvspin"
and "hv_nopvspin" to support that, but kvm doesn't.

The first patch adds that feature to KVM guest with "nopvspin".

For compatibility reason original parameters "xen_nopvspin" and
"hv_nopvspin" are retained and marked obsolete.

v8:
PATCH2: use 'kvm-guest' instead of 'kvm_guest'        [Sean Christopherson]
PATCH3: add a comment to explain missed 'return'      [Sean Christopherson]

v7:
PATCH3: update comment and use goto, add RB              [Vitaly Kuznetsov]

v6:
PATCH1: add Reviewed-by                                  [Vitaly Kuznetsov]
PATCH2: change 'pv' to 'PV', add Reviewed-by             [Vitaly Kuznetsov]
PATCH3: refactor 'if' branch in kvm_spinlock_init()      [Vitaly Kuznetsov]

v5:
PATCH1: new patch to revert a currently unnecessory commit,
        code is simpler a bit after that change.         [Boris Ostrovsky]
PATCH3: fold 'if' statement,add comments on virt_spin_lock_key,
        reorder with PATCH2 to better reflect dependency                               
PATCH4: fold 'if' statement, add Reviewed-by             [Boris Ostrovsky]
PATCH5: add Reviewed-by                                  [Michael Kelley]

v4:
PATCH1: use variable name nopvspin instead of pvspin and
        defined it as __initdata, changed print message,
        updated patch description                     [Sean Christopherson]
PATCH2: remove Suggested-by, use "kvm-guest:" prefix  [Sean Christopherson]
PATCH3: make variable nopvsin and xen_pvspin coexist
        remove Reviewed-by due to code change         [Sean Christopherson]
PATCH4: make variable nopvsin and hv_pvspin coexist   [Sean Christopherson]

v3:
PATCH2: Fix indentation

v2:
PATCH1: pick the print code change into separate PATCH2,
        updated patch description             [Vitaly Kuznetsov]
PATCH2: new patch with print code change      [Vitaly Kuznetsov]
PATCH3: add Reviewed-by                       [Juergen Gross]

Zhenzhong Duan (5):
  Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key
    get initialized"
  x86/kvm: Change print code to use pr_*() format
  x86/kvm: Add "nopvspin" parameter to disable PV spinlocks
  xen: Mark "xen_nopvspin" parameter obsolete
  x86/hyperv: Mark "hv_nopvspin" parameter obsolete

 Documentation/admin-guide/kernel-parameters.txt | 14 ++++-
 arch/x86/hyperv/hv_spinlock.c                   |  4 ++
 arch/x86/include/asm/qspinlock.h                |  1 +
 arch/x86/kernel/kvm.c                           | 79 ++++++++++++++++---------
 arch/x86/xen/spinlock.c                         |  4 +-
 kernel/locking/qspinlock.c                      |  7 +++
 6 files changed, 76 insertions(+), 33 deletions(-)

Comments

Zhenzhong Duan Oct. 29, 2019, 1:33 a.m. UTC | #1
Hi Baolo, Thomas

This patchset is reviewed pass and keep silent for a while, will anyone 
of you

consider to pick it up? Thanks

Zhenzhong

On 2019/10/23 19:16, Zhenzhong Duan wrote:
> There are cases folks want to disable spinlock optimization for
> debug/test purpose. Xen and hyperv already have parameters "xen_nopvspin"
> and "hv_nopvspin" to support that, but kvm doesn't.
>
> The first patch adds that feature to KVM guest with "nopvspin".
>
> For compatibility reason original parameters "xen_nopvspin" and
> "hv_nopvspin" are retained and marked obsolete.
>
> v8:
> PATCH2: use 'kvm-guest' instead of 'kvm_guest'        [Sean Christopherson]
> PATCH3: add a comment to explain missed 'return'      [Sean Christopherson]
>
> v7:
> PATCH3: update comment and use goto, add RB              [Vitaly Kuznetsov]
>
> v6:
> PATCH1: add Reviewed-by                                  [Vitaly Kuznetsov]
> PATCH2: change 'pv' to 'PV', add Reviewed-by             [Vitaly Kuznetsov]
> PATCH3: refactor 'if' branch in kvm_spinlock_init()      [Vitaly Kuznetsov]
>
> v5:
> PATCH1: new patch to revert a currently unnecessory commit,
>          code is simpler a bit after that change.         [Boris Ostrovsky]
> PATCH3: fold 'if' statement,add comments on virt_spin_lock_key,
>          reorder with PATCH2 to better reflect dependency
> PATCH4: fold 'if' statement, add Reviewed-by             [Boris Ostrovsky]
> PATCH5: add Reviewed-by                                  [Michael Kelley]
>
> v4:
> PATCH1: use variable name nopvspin instead of pvspin and
>          defined it as __initdata, changed print message,
>          updated patch description                     [Sean Christopherson]
> PATCH2: remove Suggested-by, use "kvm-guest:" prefix  [Sean Christopherson]
> PATCH3: make variable nopvsin and xen_pvspin coexist
>          remove Reviewed-by due to code change         [Sean Christopherson]
> PATCH4: make variable nopvsin and hv_pvspin coexist   [Sean Christopherson]
>
> v3:
> PATCH2: Fix indentation
>
> v2:
> PATCH1: pick the print code change into separate PATCH2,
>          updated patch description             [Vitaly Kuznetsov]
> PATCH2: new patch with print code change      [Vitaly Kuznetsov]
> PATCH3: add Reviewed-by                       [Juergen Gross]
>
> Zhenzhong Duan (5):
>    Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key
>      get initialized"
>    x86/kvm: Change print code to use pr_*() format
>    x86/kvm: Add "nopvspin" parameter to disable PV spinlocks
>    xen: Mark "xen_nopvspin" parameter obsolete
>    x86/hyperv: Mark "hv_nopvspin" parameter obsolete
>
>   Documentation/admin-guide/kernel-parameters.txt | 14 ++++-
>   arch/x86/hyperv/hv_spinlock.c                   |  4 ++
>   arch/x86/include/asm/qspinlock.h                |  1 +
>   arch/x86/kernel/kvm.c                           | 79 ++++++++++++++++---------
>   arch/x86/xen/spinlock.c                         |  4 +-
>   kernel/locking/qspinlock.c                      |  7 +++
>   6 files changed, 76 insertions(+), 33 deletions(-)
>
Zhenzhong Duan Nov. 19, 2019, 2:01 a.m. UTC | #2
Hi Maintainers,

May I get a final update on this patchset?

There is only a few days remaining before my layoff at Oracle. I can't 
login the mail address after that.

No matter if you prefer to reject it, please let me know. I'd like to 
get an end to this patchset.

Thanks

Zhenzhong


On 2019/10/29 9:33, Zhenzhong Duan wrote:
> Hi Baolo, Thomas
>
> This patchset is reviewed pass and keep silent for a while, will 
> anyone of you
>
> consider to pick it up? Thanks
>
> Zhenzhong
>
> On 2019/10/23 19:16, Zhenzhong Duan wrote:
>> There are cases folks want to disable spinlock optimization for
>> debug/test purpose. Xen and hyperv already have parameters 
>> "xen_nopvspin"
>> and "hv_nopvspin" to support that, but kvm doesn't.
>>
>> The first patch adds that feature to KVM guest with "nopvspin".
>>
>> For compatibility reason original parameters "xen_nopvspin" and
>> "hv_nopvspin" are retained and marked obsolete.
>>
>> v8:
>> PATCH2: use 'kvm-guest' instead of 'kvm_guest'        [Sean 
>> Christopherson]
>> PATCH3: add a comment to explain missed 'return'      [Sean 
>> Christopherson]
>>
>> v7:
>> PATCH3: update comment and use goto, add RB              [Vitaly 
>> Kuznetsov]
>>
>> v6:
>> PATCH1: add Reviewed-by                                  [Vitaly 
>> Kuznetsov]
>> PATCH2: change 'pv' to 'PV', add Reviewed-by             [Vitaly 
>> Kuznetsov]
>> PATCH3: refactor 'if' branch in kvm_spinlock_init()      [Vitaly 
>> Kuznetsov]
>>
>> v5:
>> PATCH1: new patch to revert a currently unnecessory commit,
>>          code is simpler a bit after that change.         [Boris 
>> Ostrovsky]
>> PATCH3: fold 'if' statement,add comments on virt_spin_lock_key,
>>          reorder with PATCH2 to better reflect dependency
>> PATCH4: fold 'if' statement, add Reviewed-by             [Boris 
>> Ostrovsky]
>> PATCH5: add Reviewed-by [Michael Kelley]
>>
>> v4:
>> PATCH1: use variable name nopvspin instead of pvspin and
>>          defined it as __initdata, changed print message,
>>          updated patch description                     [Sean 
>> Christopherson]
>> PATCH2: remove Suggested-by, use "kvm-guest:" prefix  [Sean 
>> Christopherson]
>> PATCH3: make variable nopvsin and xen_pvspin coexist
>>          remove Reviewed-by due to code change         [Sean 
>> Christopherson]
>> PATCH4: make variable nopvsin and hv_pvspin coexist   [Sean 
>> Christopherson]
>>
>> v3:
>> PATCH2: Fix indentation
>>
>> v2:
>> PATCH1: pick the print code change into separate PATCH2,
>>          updated patch description             [Vitaly Kuznetsov]
>> PATCH2: new patch with print code change      [Vitaly Kuznetsov]
>> PATCH3: add Reviewed-by                       [Juergen Gross]
>>
>> Zhenzhong Duan (5):
>>    Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key
>>      get initialized"
>>    x86/kvm: Change print code to use pr_*() format
>>    x86/kvm: Add "nopvspin" parameter to disable PV spinlocks
>>    xen: Mark "xen_nopvspin" parameter obsolete
>>    x86/hyperv: Mark "hv_nopvspin" parameter obsolete
>>
>>   Documentation/admin-guide/kernel-parameters.txt | 14 ++++-
>>   arch/x86/hyperv/hv_spinlock.c                   |  4 ++
>>   arch/x86/include/asm/qspinlock.h                |  1 +
>>   arch/x86/kernel/kvm.c                           | 79 
>> ++++++++++++++++---------
>>   arch/x86/xen/spinlock.c                         |  4 +-
>>   kernel/locking/qspinlock.c                      |  7 +++
>>   6 files changed, 76 insertions(+), 33 deletions(-)
>>
Paolo Bonzini March 14, 2020, 11:14 a.m. UTC | #3
Peter/Thomas, can you apply this to tip or give your Acked-by?

Thanks,

Paolo

On 23/10/19 13:16, Zhenzhong Duan wrote:
> There are cases folks want to disable spinlock optimization for
> debug/test purpose. Xen and hyperv already have parameters "xen_nopvspin"
> and "hv_nopvspin" to support that, but kvm doesn't.
> 
> The first patch adds that feature to KVM guest with "nopvspin".
> 
> For compatibility reason original parameters "xen_nopvspin" and
> "hv_nopvspin" are retained and marked obsolete.
> 
> v8:
> PATCH2: use 'kvm-guest' instead of 'kvm_guest'        [Sean Christopherson]
> PATCH3: add a comment to explain missed 'return'      [Sean Christopherson]
> 
> v7:
> PATCH3: update comment and use goto, add RB              [Vitaly Kuznetsov]
> 
> v6:
> PATCH1: add Reviewed-by                                  [Vitaly Kuznetsov]
> PATCH2: change 'pv' to 'PV', add Reviewed-by             [Vitaly Kuznetsov]
> PATCH3: refactor 'if' branch in kvm_spinlock_init()      [Vitaly Kuznetsov]
> 
> v5:
> PATCH1: new patch to revert a currently unnecessory commit,
>         code is simpler a bit after that change.         [Boris Ostrovsky]
> PATCH3: fold 'if' statement,add comments on virt_spin_lock_key,
>         reorder with PATCH2 to better reflect dependency                               
> PATCH4: fold 'if' statement, add Reviewed-by             [Boris Ostrovsky]
> PATCH5: add Reviewed-by                                  [Michael Kelley]
> 
> v4:
> PATCH1: use variable name nopvspin instead of pvspin and
>         defined it as __initdata, changed print message,
>         updated patch description                     [Sean Christopherson]
> PATCH2: remove Suggested-by, use "kvm-guest:" prefix  [Sean Christopherson]
> PATCH3: make variable nopvsin and xen_pvspin coexist
>         remove Reviewed-by due to code change         [Sean Christopherson]
> PATCH4: make variable nopvsin and hv_pvspin coexist   [Sean Christopherson]
> 
> v3:
> PATCH2: Fix indentation
> 
> v2:
> PATCH1: pick the print code change into separate PATCH2,
>         updated patch description             [Vitaly Kuznetsov]
> PATCH2: new patch with print code change      [Vitaly Kuznetsov]
> PATCH3: add Reviewed-by                       [Juergen Gross]
> 
> Zhenzhong Duan (5):
>   Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key
>     get initialized"
>   x86/kvm: Change print code to use pr_*() format
>   x86/kvm: Add "nopvspin" parameter to disable PV spinlocks
>   xen: Mark "xen_nopvspin" parameter obsolete
>   x86/hyperv: Mark "hv_nopvspin" parameter obsolete
> 
>  Documentation/admin-guide/kernel-parameters.txt | 14 ++++-
>  arch/x86/hyperv/hv_spinlock.c                   |  4 ++
>  arch/x86/include/asm/qspinlock.h                |  1 +
>  arch/x86/kernel/kvm.c                           | 79 ++++++++++++++++---------
>  arch/x86/xen/spinlock.c                         |  4 +-
>  kernel/locking/qspinlock.c                      |  7 +++
>  6 files changed, 76 insertions(+), 33 deletions(-)
>