linux_dsm_epyc7002/arch/s390/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
..
diag.c s390/mm: split arch/s390/mm/pgtable.c 2016-03-08 15:00:15 +01:00
gaccess.c KVM: s390: gaccess: implement instruction fetching mode 2016-02-10 13:12:51 +01:00
gaccess.h KVM: s390: gaccess: implement instruction fetching mode 2016-02-10 13:12:51 +01:00
guestdbg.c s390: Fix misspellings in comments 2016-03-08 15:00:17 +01:00
intercept.c KVM: s390: irq delivery should not rely on icptcode 2016-02-10 13:12:53 +01:00
interrupt.c KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
irq.h KVM: s390: irq routing for adapter interrupts. 2014-03-21 13:43:00 +01:00
Kconfig KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
kvm-s390.c KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
kvm-s390.h KVM: s390: allocate only one DMA page per VM 2016-03-08 13:57:54 +01:00
Makefile KVM: s390: Enable the KVM-VFIO device 2016-01-26 15:40:17 +01:00
priv.c KVM: s390: cleanup cpuid handling 2016-05-09 13:33:57 +02:00
sigp.c KVM: s390: enable SRS only if enabled for the guest 2016-05-09 13:33:55 +02:00
trace-s390.h KVM: s390: obey kptr_restrict in traces 2015-12-15 17:06:32 +01:00
trace.h KVM: s390: interpretive execution of SIGP EXTERNAL CALL 2014-05-16 14:57:28 +02:00