kernel-ark/arch/powerpc/kvm
Christian Borntraeger 3491caf275 KVM: halt_polling: provide a way to qualify wakeups during poll
Some wakeups should not be considered a sucessful poll. For example on
s390 I/O interrupts are usually floating, which means that _ALL_ CPUs
would be considered runnable - letting all vCPUs poll all the time for
transactional like workload, even if one vCPU would be enough.
This can result in huge CPU usage for large guests.
This patch lets architectures provide a way to qualify wakeups if they
should be considered a good/bad wakeups in regard to polls.

For s390 the implementation will fence of halt polling for anything but
known good, single vCPU events. The s390 implementation for floating
interrupts does a wakeup for one vCPU, but the interrupt will be delivered
by whatever CPU checks first for a pending interrupt. We prefer the
woken up CPU by marking the poll of this CPU as "good" poll.
This code will also mark several other wakeup reasons like IPI or
expired timers as "good". This will of course also mark some events as
not sucessful. As  KVM on z runs always as a 2nd level hypervisor,
we prefer to not poll, unless we are really sure, though.

This patch successfully limits the CPU usage for cases like uperf 1byte
transactional ping pong workload or wakeup heavy workload like OLTP
while still providing a proper speedup.

This also introduced a new vcpu stat "halt_poll_no_tuning" that marks
wakeups that are considered not good for polling.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Radim Krčmář <rkrcmar@redhat.com> (for an earlier version)
Cc: David Matlack <dmatlack@google.com>
Cc: Wanpeng Li <kernellwp@gmail.com>
[Rename config symbol. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-05-13 17:29:23 +02:00
..
book3s_32_mmu_host.c powerpc/mm: Move hash related mmu-*.h headers to book3s/ 2016-03-03 21:19:21 +11:00
book3s_32_mmu.c
book3s_32_sr.S
book3s_64_mmu_host.c powerpc/mm: Move hash related mmu-*.h headers to book3s/ 2016-03-03 21:19:21 +11:00
book3s_64_mmu_hv.c powerpc/mm: Move hash related mmu-*.h headers to book3s/ 2016-03-03 21:19:21 +11:00
book3s_64_mmu.c powerpc/mm: Move hash related mmu-*.h headers to book3s/ 2016-03-03 21:19:21 +11:00
book3s_64_slb.S
book3s_64_vio_hv.c KVM: PPC: Create a virtual-mode only TCE table handlers 2016-03-22 12:02:51 +01:00
book3s_64_vio.c KVM: PPC: Create a virtual-mode only TCE table handlers 2016-03-22 12:02:51 +01:00
book3s_emulate.c KVM: PPC: Fix warnings from sparse 2015-08-22 11:16:16 +02:00
book3s_exports.c
book3s_hv_builtin.c KVM: PPC: Book3S HV: Host-side RM data structures 2016-02-29 16:25:06 +11:00
book3s_hv_interrupts.S
book3s_hv_ras.c
book3s_hv_rm_mmu.c powerpc/mm: Move hash related mmu-*.h headers to book3s/ 2016-03-03 21:19:21 +11:00
book3s_hv_rm_xics.c KVM: PPC: Book3S HV: Add tunable to control H_IPI redirection 2016-02-29 16:25:06 +11:00
book3s_hv_rmhandlers.S KVM: PPC: Create a virtual-mode only TCE table handlers 2016-03-22 12:02:51 +01:00
book3s_hv.c KVM: PPC: Book3S HV: Fix build error in book3s_hv.c 2016-05-11 21:19:10 +10:00
book3s_interrupts.S
book3s_mmu_hpte.c
book3s_paired_singles.c powerpc: Create disable_kernel_{fp,altivec,vsx,spe}() 2015-12-01 13:52:25 +11:00
book3s_pr_papr.c KVM: PPC: Add support for multiple-TCE hcalls 2016-02-16 13:44:26 +11:00
book3s_pr.c KVM: PPC: Book3S PR: Manage single-step mode 2016-05-11 21:19:10 +10:00
book3s_rmhandlers.S
book3s_rtas.c
book3s_segment.S KVM: PPC: Book3S: correct width in XER handling 2015-08-22 11:16:19 +02:00
book3s_xics.c KVM: PPC: Book3S HV: Re-enable XICS fast path for irqfd-generated interrupts 2016-05-12 16:40:55 +10:00
book3s_xics.h KVM: PPC: Book3S HV: Re-enable XICS fast path for irqfd-generated interrupts 2016-05-12 16:40:55 +10:00
book3s.c KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
book3s.h
booke_emulate.c
booke_interrupts.S
booke.c KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
booke.h
bookehv_interrupts.S
e500_emulate.c KVM: PPC: e500: Emulate TMCFG0 TMRN register 2015-10-15 15:58:16 +11:00
e500_mmu_host.c kvm: rename pfn_t to kvm_pfn_t 2016-01-15 17:56:32 -08:00
e500_mmu_host.h
e500_mmu.c KVM: PPC: fix suspicious use of conditional operator 2015-08-22 11:16:16 +02:00
e500.c KVM: PPC: e500: fix handling local_sid_lookup result 2015-10-15 15:58:16 +11:00
e500.h kvm: rename pfn_t to kvm_pfn_t 2016-01-15 17:56:32 -08:00
e500mc.c powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
emulate_loadstore.c
emulate.c
fpu.S
irq.h
Kconfig KVM: PPC: Remove PPC970 from KVM_BOOK3S_64_HV text in Kconfig 2015-08-22 11:16:16 +02:00
Makefile KVM: PPC: do not compile in vfio.o unconditionally 2016-03-22 16:38:38 +01:00
mpic.c
powerpc.c KVM: PPC: Fix emulated MMIO sign-extension 2016-05-11 21:19:10 +10:00
timing.c
timing.h
trace_book3s.h
trace_booke.h
trace_hv.h
trace_pr.h kvm: rename pfn_t to kvm_pfn_t 2016-01-15 17:56:32 -08:00
trace.h