Skip to content

qspinlock with paravirt support

Peter Zijlstra kvm linux-arch lkml virtualization xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 106 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11qspinlock: A simple generic 4-byte queue spinlockinclude/asm-generic/qspinlock.h include/asm-generic/qspinlock_types.h kernel/Kconfig.locks +3 more+385 -019 replies
1/11qspinlock: A simple generic 4-byte queue spinlockinclude/asm-generic/qspinlock.h include/asm-generic/qspinlock_types.h kernel/Kconfig.locks +3 more+385 -00 replies
2/11qspinlock, x86: Enable x86-64 to use queue spinlockarch/x86/Kconfig arch/x86/include/asm/qspinlock.h arch/x86/include/asm/spinlock.h +1 more+35 -00 replies
2/11qspinlock, x86: Enable x86-64 to use queue spinlockarch/x86/Kconfig arch/x86/include/asm/qspinlock.h arch/x86/include/asm/spinlock.h +1 more+35 -00 replies
2/11qspinlock, x86: Enable x86-64 to use queue spinlockarch/x86/Kconfig arch/x86/include/asm/qspinlock.h arch/x86/include/asm/spinlock.h +1 more+35 -00 replies
3/11qspinlock: Add pending bitinclude/asm-generic/qspinlock_types.h kernel/locking/qspinlock.c+97 -2418 replies
3/11qspinlock: Add pending bitinclude/asm-generic/qspinlock_types.h kernel/locking/qspinlock.c+97 -240 replies
4/11qspinlock: Extract out the exchange of tail code wordinclude/asm-generic/qspinlock_types.h kernel/locking/qspinlock.c+38 -2214 replies
4/11qspinlock: Extract out the exchange of tail code wordinclude/asm-generic/qspinlock_types.h kernel/locking/qspinlock.c+38 -220 replies
4/11qspinlock: Extract out the exchange of tail code wordinclude/asm-generic/qspinlock_types.h kernel/locking/qspinlock.c+38 -220 replies
5/11qspinlock: Optimize for smaller NR_CPUSinclude/asm-generic/qspinlock_types.h kernel/locking/qspinlock.c+106 -1015 replies
5/11qspinlock: Optimize for smaller NR_CPUSinclude/asm-generic/qspinlock_types.h kernel/locking/qspinlock.c+106 -100 replies
6/11qspinlock: Optimize pending bitkernel/locking/qspinlock.c+10 -02 replies
6/11qspinlock: Optimize pending bitkernel/locking/qspinlock.c+10 -00 replies
6/11qspinlock: Optimize pending bitkernel/locking/qspinlock.c+10 -00 replies
7/11qspinlock: Use a simple write to grab the lock, if applicablekernel/locking/qspinlock.c+43 -164 replies
7/11qspinlock: Use a simple write to grab the lock, if applicablekernel/locking/qspinlock.c+43 -160 replies
8/11qspinlock: Revert to test-and-set on hypervisorsarch/x86/include/asm/qspinlock.h include/asm-generic/qspinlock.h kernel/locking/qspinlock.c+24 -05 replies
8/11qspinlock: Revert to test-and-set on hypervisorsarch/x86/include/asm/qspinlock.h include/asm-generic/qspinlock.h kernel/locking/qspinlock.c+24 -00 replies
9/11pvqspinlock, x86: Rename paravirt_ticketlocks_enabledarch/x86/include/asm/spinlock.h arch/x86/kernel/kvm.c arch/x86/kernel/paravirt-spinlocks.c +1 more+6 -62 replies
9/11pvqspinlock, x86: Rename paravirt_ticketlocks_enabledarch/x86/include/asm/spinlock.h arch/x86/kernel/kvm.c arch/x86/kernel/paravirt-spinlocks.c +1 more+6 -60 replies
9/11pvqspinlock, x86: Rename paravirt_ticketlocks_enabledarch/x86/include/asm/spinlock.h arch/x86/kernel/kvm.c arch/x86/kernel/paravirt-spinlocks.c +1 more+6 -60 replies
10/11qspinlock: Paravirt supportarch/x86/include/asm/paravirt.h arch/x86/include/asm/paravirt_types.h arch/x86/include/asm/qspinlock.h +5 more+302 -321 replies
10/11qspinlock: Paravirt supportarch/x86/include/asm/paravirt.h arch/x86/include/asm/paravirt_types.h arch/x86/include/asm/qspinlock.h +5 more+302 -30 replies
11/11qspinlock, kvm: Add paravirt supportarch/x86/kernel/kvm.c kernel/Kconfig.locks+59 -14 replies
11/11qspinlock, kvm: Add paravirt supportarch/x86/kernel/kvm.c kernel/Kconfig.locks+59 -10 replies
11/11qspinlock, kvm: Add paravirt supportarch/x86/kernel/kvm.c kernel/Kconfig.locks+59 -10 replies

Reviews trailers per patch

3 of 27 patches have a Reviewed-by or Acked-by.

PatchKonrad Rzeszutek Wilk
1/11
1/11
2/11
2/11
2/11
3/11
3/11
4/11
4/11
4/11
5/11
5/11
6/11
6/11
6/11
7/11
7/11
8/11
8/11
9/11A-b A-b
9/11A-b A-b
9/11A-b A-b
10/11
10/11
11/11
11/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/11] qspinlock with paravirt support

Since Waiman seems incapable of doing simple things; here's my take on the paravirt crap.

The first few patches are taken from Waiman's latest series, but the virt support is completely new. Its primary aim is to not mess up the native code.

I've not stress tested it, but the virt and paravirt (kvm) cases boot on simple smp guests. I've not done Xen, but the patch should be simple and similar.

I ripped out all the unfair nonsense as its not at all required for paravirt and optimizations that make paravirt better at the cost of code clarity and/or native performance are just not worth it.

Also; if we were to ever add some of that unfair nonsense you do so _after_ you got the simple things working.

The thing I'm least sure about is the head tracking, I chose to do something different from what Waiman did, because his is O(nr_cpus) and had the assumption that guests have small nr_cpus. AFAIK this is not at all true. The biggest problem I have with what I did is that it contains wait loops itself.