forked from Minki/linux
3491caf275
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>
61 lines
1.5 KiB
Plaintext
61 lines
1.5 KiB
Plaintext
#
|
|
# KVM configuration
|
|
#
|
|
source "virt/kvm/Kconfig"
|
|
|
|
menuconfig VIRTUALIZATION
|
|
def_bool y
|
|
prompt "KVM"
|
|
---help---
|
|
Say Y here to get to see options for using your Linux host to run other
|
|
operating systems inside virtual machines (guests).
|
|
This option alone does not add any kernel code.
|
|
|
|
If you say N, all options in this submenu will be skipped and disabled.
|
|
|
|
if VIRTUALIZATION
|
|
|
|
config KVM
|
|
def_tristate y
|
|
prompt "Kernel-based Virtual Machine (KVM) support"
|
|
depends on HAVE_KVM
|
|
select PREEMPT_NOTIFIERS
|
|
select ANON_INODES
|
|
select HAVE_KVM_CPU_RELAX_INTERCEPT
|
|
select HAVE_KVM_EVENTFD
|
|
select KVM_ASYNC_PF
|
|
select KVM_ASYNC_PF_SYNC
|
|
select HAVE_KVM_IRQCHIP
|
|
select HAVE_KVM_IRQFD
|
|
select HAVE_KVM_IRQ_ROUTING
|
|
select HAVE_KVM_INVALID_WAKEUPS
|
|
select SRCU
|
|
select KVM_VFIO
|
|
---help---
|
|
Support hosting paravirtualized guest machines using the SIE
|
|
virtualization capability on the mainframe. This should work
|
|
on any 64bit machine.
|
|
|
|
This module provides access to the hardware capabilities through
|
|
a character device node named /dev/kvm.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called kvm.
|
|
|
|
If unsure, say N.
|
|
|
|
config KVM_S390_UCONTROL
|
|
bool "Userspace controlled virtual machines"
|
|
depends on KVM
|
|
---help---
|
|
Allow CAP_SYS_ADMIN users to create KVM virtual machines that are
|
|
controlled by userspace.
|
|
|
|
If unsure, say N.
|
|
|
|
# OK, it's a little counter-intuitive to do this, but it puts it neatly under
|
|
# the virtualization menu.
|
|
source drivers/vhost/Kconfig
|
|
|
|
endif # VIRTUALIZATION
|