Skip to content

convert slotslock to SRCU

Marcelo Tosatti kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11KVM: modify memslots layout in struct kvmarch/x86/kvm/mmu.c arch/x86/kvm/vmx.c arch/x86/kvm/x86.c +3 more+53 -320 replies
1/11KVM: modify memslots layout in struct kvmarch/x86/kvm/mmu.c arch/x86/kvm/vmx.c arch/x86/kvm/x86.c +3 more+53 -320 replies
2/11KVM: modify alias layout in x86s struct kvm_archarch/x86/include/asm/kvm_host.h arch/x86/kvm/x86.c+22 -70 replies
2/11KVM: modify alias layout in x86s struct kvm_archarch/x86/include/asm/kvm_host.h arch/x86/kvm/x86.c+22 -70 replies
3/11KVM: split kvm_arch_set_memory_region into prepare and commitarch/ia64/kvm/kvm-ia64.c arch/s390/kvm/kvm-s390.c arch/x86/kvm/x86.c +2 more+61 -400 replies
3/11KVM: split kvm_arch_set_memory_region into prepare and commitarch/ia64/kvm/kvm-ia64.c arch/s390/kvm/kvm-s390.c arch/x86/kvm/x86.c +2 more+61 -400 replies
4/11KVM: introduce gfn_to_pfn_memslotinclude/linux/kvm_host.h virt/kvm/kvm_main.c+27 -81 reply
4/11KVM: introduce gfn_to_pfn_memslotinclude/linux/kvm_host.h virt/kvm/kvm_main.c+27 -80 replies
5/11KVM: use gfn_to_pfn_memslot in kvm_iommu_map_pagesinclude/linux/kvm_host.h virt/kvm/iommu.c virt/kvm/kvm_main.c+8 -100 replies
5/11KVM: use gfn_to_pfn_memslot in kvm_iommu_map_pagesinclude/linux/kvm_host.h virt/kvm/iommu.c virt/kvm/kvm_main.c+8 -100 replies
6/11KVM: introduce kvm->srcu and convert kvm_set_memory_region to SRCU updatearch/ia64/kvm/kvm-ia64.c arch/x86/kvm/mmu.c arch/x86/kvm/vmx.c +5 more+132 -634 replies
6/11KVM: introduce kvm->srcu and convert kvm_set_memory_region to SRCU updatearch/ia64/kvm/kvm-ia64.c arch/x86/kvm/mmu.c arch/x86/kvm/vmx.c +5 more+135 -630 replies
7/11KVM: use SRCU for dirty logarch/x86/kvm/x86.c+41 -80 replies
7/11KVM: use SRCU for dirty logarch/x86/kvm/x86.c+41 -80 replies
8/11KVM: x86: switch kvm_set_memory_alias to SRCU updatearch/x86/include/asm/kvm_host.h arch/x86/kvm/x86.c include/linux/kvm_host.h +1 more+63 -110 replies
8/11KVM: x86: switch kvm_set_memory_alias to SRCU updatearch/x86/include/asm/kvm_host.h arch/x86/kvm/x86.c include/linux/kvm_host.h +1 more+63 -110 replies
9/11KVM: convert io_bus to SRCUarch/ia64/kvm/kvm-ia64.c arch/x86/kvm/i8254.c arch/x86/kvm/i8259.c +6 more+101 -750 replies
9/11KVM: convert io_bus to SRCUarch/ia64/kvm/kvm-ia64.c arch/x86/kvm/i8254.c arch/x86/kvm/i8259.c +6 more+101 -750 replies
10/11KVM: switch vcpu context to use SRCUarch/ia64/kvm/kvm-ia64.c arch/s390/kvm/kvm-s390.h arch/x86/kvm/mmu.c +3 more+45 -380 replies
10/11KVM: switch vcpu context to use SRCUarch/ia64/kvm/kvm-ia64.c arch/s390/kvm/kvm-s390.h arch/x86/kvm/mmu.c +3 more+45 -380 replies
11/11KVM: convert slots_lock to a mutexarch/ia64/kvm/kvm-ia64.c arch/x86/kvm/i8254.c arch/x86/kvm/i8259.c +7 more+37 -370 replies
11/11KVM: convert slots_lock to a mutexarch/ia64/kvm/kvm-ia64.c arch/x86/kvm/i8254.c arch/x86/kvm/i8259.c +7 more+37 -370 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 00/11] convert slotslock to SRCU

Now that synchronize_srcu_expedited is in the tree, we can continue the convertion of slots_lock to SRCU.

Results:
up:

srcu-memslot:
cpuid 2157
vmcall 1992
mov_from_cr8 11
mov_to_cr8 17
inl_from_pmtimer 11226
ipi (skipped)
ipi+halt (skipped)

stock:
cpuid 2272
vmcall 2114
mov_from_cr8 11
mov_to_cr8 17
inl_from_pmtimer 11521
ipi (skipped)
ipi+halt (skipped)

vmcall 6.1% improvement

smp 2:

srcu-memslot:
cpuid 2333
vmcall 2165
mov_from_cr8 11
mov_to_cr8 18
inl_from_pmtimer 12233
ipi 40734
ipi+halt 41675

stock:
cpuid 2512
vmcall 2367
mov_from_cr8 11
mov_to_cr8 18
inl_from_pmtimer 12821
ipi 42941
ipi+halt 43146

vmcall 9.3% improvement