kernel-ark/arch/arm
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
..
boot ARM: DT changes, part 2 2016-03-24 19:01:38 -07:00
common Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-03-19 16:31:54 -07:00
configs ARM: SoC defconfig updates for v4.6 2016-03-20 15:32:14 -07:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-03-17 11:22:54 -07:00
firmware
include KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
kernel ARM: 8550/1: protect idiv patching against undefined gcc behavior 2016-04-07 21:57:02 +01:00
kvm kvm: arm64: Enable hardware updates of the Access Flag for Stage 2 page tables 2016-05-09 22:23:08 +02:00
lib
mach-alpine ARM: alpine: select the Alpine MSI controller driver 2016-02-26 22:57:22 +01:00
mach-artpec arm: initial machine port for artpec-6 SoC 2016-02-24 13:55:47 -08:00
mach-asm9260
mach-at91
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-davinci ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
mach-digicolor
mach-dove ARM: orion: only select I2C_BOARDINFO when using I2C 2016-02-25 15:37:16 +01:00
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
mach-footbridge
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
mach-integrator
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
mach-keystone ARM: DT updates for v4.6 2016-03-20 15:15:48 -07:00
mach-ks8695 ARM: SoC non-urgent fixes for v4.6 2016-03-20 14:26:57 -07:00
mach-lpc18xx
mach-lpc32xx ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-mediatek ARM: DT updates for v4.6 2016-03-20 15:15:48 -07:00
mach-meson
mach-mmp
mach-moxart
mach-mv78xx0 ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-mvebu The clk changes for this release cycle are mostly dominated by 2016-03-23 06:06:45 -07:00
mach-mxs
mach-netx ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-nomadik
mach-nspire ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-omap1 ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
mach-omap2 ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
mach-orion5x ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-picoxcell
mach-prima2 ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-pxa ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
mach-qcom
mach-realview
mach-rockchip
mach-rpc
mach-s3c24xx ARM: SoC 64-bit changes for v4.6 2016-03-20 15:08:45 -07:00
mach-s3c64xx ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
mach-s5pv210
mach-sa1100 Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-03-19 16:31:54 -07:00
mach-shmobile The clk changes for this release cycle are mostly dominated by 2016-03-23 06:06:45 -07:00
mach-socfpga ARM: SoC non-urgent fixes for v4.6 2016-03-20 14:26:57 -07:00
mach-spear
mach-sti
mach-stm32
mach-sunxi
mach-tango
mach-tegra Here's another round of updates for -next: 2016-03-01 17:03:27 -05:00
mach-u300
mach-uniphier ARM: uniphier: rework SMP code to support new System Bus binding 2016-03-18 17:36:37 +01:00
mach-ux500 ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900 Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-03-19 16:31:54 -07:00
mach-zx
mach-zynq ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
mm Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-04-10 17:48:17 -07:00
net
nwfpe
oprofile
plat-iop
plat-omap
plat-orion Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-03-19 16:31:54 -07:00
plat-pxa ARM: pxa: add the number of DMA requestor lines 2016-02-26 22:57:05 +01:00
plat-samsung MTD updates for v4.6 2016-03-24 19:57:15 -07:00
plat-versatile
probes
tools
vdso
vfp
xen
Kconfig ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
Kconfig-nommu
Kconfig.debug
Makefile ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00