![Marcelo Tosatti](/assets/img/avatar_default.png)
The cpuidle_haltpoll governor, in conjunction with the haltpoll cpuidle driver, allows guest vcpus to poll for a specified amount of time before halting. This provides the following benefits to host side polling: 1) The POLL flag is set while polling is performed, which allows a remote vCPU to avoid sending an IPI (and the associated cost of handling the IPI) when performing a wakeup. 2) The VM-exit cost can be avoided. The downside of guest side polling is that polling is performed even with other runnable tasks in the host. Results comparing halt_poll_ns and server/client application where a small packet is ping-ponged: host --> 31.33 halt_poll_ns=300000 / no guest busy spin --> 33.40 (93.8%) halt_poll_ns=0 / guest_halt_poll_ns=300000 --> 32.73 (95.7%) For the SAP HANA benchmarks (where idle_spin is a parameter of the previous version of the patch, results should be the same): hpns == halt_poll_ns idle_spin=0/ idle_spin=800/ idle_spin=0/ hpns=200000 hpns=0 hpns=800000 DeleteC06T03 (100 thread) 1.76 1.71 (-3%) 1.78 (+1%) InsertC16T02 (100 thread) 2.14 2.07 (-3%) 2.18 (+1.8%) DeleteC00T01 (1 thread) 1.34 1.28 (-4.5%) 1.29 (-3.7%) UpdateC00T03 (1 thread) 4.72 4.18 (-12%) 4.53 (-5%) Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
79 lines
2.1 KiB
Plaintext
79 lines
2.1 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
menu "CPU Idle"
|
|
|
|
config CPU_IDLE
|
|
bool "CPU idle PM support"
|
|
default y if ACPI || PPC_PSERIES
|
|
select CPU_IDLE_GOV_LADDER if (!NO_HZ && !NO_HZ_IDLE)
|
|
select CPU_IDLE_GOV_MENU if (NO_HZ || NO_HZ_IDLE) && !CPU_IDLE_GOV_TEO
|
|
help
|
|
CPU idle is a generic framework for supporting software-controlled
|
|
idle processor power management. It includes modular cross-platform
|
|
governors that can be swapped during runtime.
|
|
|
|
If you're using an ACPI-enabled platform, you should say Y here.
|
|
|
|
if CPU_IDLE
|
|
|
|
config CPU_IDLE_MULTIPLE_DRIVERS
|
|
bool
|
|
|
|
config CPU_IDLE_GOV_LADDER
|
|
bool "Ladder governor (for periodic timer tick)"
|
|
|
|
config CPU_IDLE_GOV_MENU
|
|
bool "Menu governor (for tickless system)"
|
|
|
|
config CPU_IDLE_GOV_TEO
|
|
bool "Timer events oriented (TEO) governor (for tickless systems)"
|
|
help
|
|
This governor implements a simplified idle state selection method
|
|
focused on timer events and does not do any interactivity boosting.
|
|
|
|
Some workloads benefit from using it and it generally should be safe
|
|
to use. Say Y here if you are not happy with the alternatives.
|
|
|
|
config CPU_IDLE_GOV_HALTPOLL
|
|
bool "Haltpoll governor (for virtualized systems)"
|
|
depends on KVM_GUEST
|
|
help
|
|
This governor implements haltpoll idle state selection, to be
|
|
used in conjunction with the haltpoll cpuidle driver, allowing
|
|
for polling for a certain amount of time before entering idle
|
|
state.
|
|
|
|
Some virtualized workloads benefit from using it.
|
|
|
|
config DT_IDLE_STATES
|
|
bool
|
|
|
|
menu "ARM CPU Idle Drivers"
|
|
depends on ARM || ARM64
|
|
source "drivers/cpuidle/Kconfig.arm"
|
|
endmenu
|
|
|
|
menu "MIPS CPU Idle Drivers"
|
|
depends on MIPS
|
|
source "drivers/cpuidle/Kconfig.mips"
|
|
endmenu
|
|
|
|
menu "POWERPC CPU Idle Drivers"
|
|
depends on PPC
|
|
source "drivers/cpuidle/Kconfig.powerpc"
|
|
endmenu
|
|
|
|
config HALTPOLL_CPUIDLE
|
|
tristate "Halt poll cpuidle driver"
|
|
depends on X86 && KVM_GUEST
|
|
default y
|
|
help
|
|
This option enables halt poll cpuidle driver, which allows to poll
|
|
before halting in the guest (more efficient than polling in the
|
|
host via halt_poll_ns for some scenarios).
|
|
|
|
endif
|
|
|
|
config ARCH_NEEDS_CPU_IDLE_COUPLED
|
|
def_bool n
|
|
endmenu
|