mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 01:51:18 +00:00
0e8a631328
CONFIG_VIRT_CPU_ACCOUNTING_GEN under pseries does not provide stolen time accounting unless CONFIG_PARAVIRT_TIME_ACCOUNTING is enabled. Implement this using the VPA accumulated wait counters. Note this will not work on current KVM hosts because KVM does not implement the VPA dispatch counters (yet). It could be implemented with the dispatch trace log as it is for VIRT_CPU_ACCOUNTING_NATIVE, but that is not necessary for the more limited accounting provided by PARAVIRT_TIME_ACCOUNTING, and it is more expensive, complex, and has downsides like potential log wrap. From Shrikanth: [...] it was tested on Power10 [PowerVM] Shared LPAR. system has two LPAR. we will call first one LPAR1 and second one as LPAR2. Test was carried out in SMT=1. Similar observation was seen in SMT=8 as well. LPAR config header from each LPAR is below. LPAR1 is twice as big as LPAR2. Since Both are sharing the same underlying hardware, work stealing will happen when both the LPAR's are contending for the same resource. LPAR1: type=Shared mode=Uncapped smt=Off lcpu=40 cpus=40 ent=20.00 LPAR2: type=Shared mode=Uncapped smt=Off lcpu=20 cpus=40 ent=10.00 mpstat was used to check for the utilization. stress-ng has been used as the workload. Few cases are tested. when the both LPAR are idle there is no steal time. when LPAR1 starts running at 100% which consumes all of the physical resource, steal time starts to get accounted. With LPAR1 running at 100% and LPAR2 starts running, steal time starts increasing. This is as expected. When the LPAR2 Load is increased further, steal time increases further. Case 1: 0% LPAR1; 0% LPAR2 %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle 0.00 0.00 0.05 0.00 0.00 0.00 0.00 0.00 0.00 99.95 Case 2: 100% LPAR1; 0% LPAR2 %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle 97.68 0.00 0.00 0.00 0.00 0.00 2.32 0.00 0.00 0.00 Case 3: 100% LPAR1; 50% LPAR2 %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle 86.34 0.00 0.10 0.00 0.00 0.03 13.54 0.00 0.00 0.00 Case 4: 100% LPAR1; 100% LPAR2 %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle 78.54 0.00 0.07 0.00 0.00 0.02 21.36 0.00 0.00 0.00 Case 5: 50% LPAR1; 100% LPAR2 %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle 49.37 0.00 0.00 0.00 0.00 0.00 1.17 0.00 0.00 49.47 Patch is accounting for the steal time and basic tests are holding good. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Tested-by: Shrikanth Hegde <sshegde@linux.ibm.com> [mpe: Add SPDX tag to new paravirt_api_clock.h] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220902085316.2071519-3-npiggin@gmail.com
184 lines
5.6 KiB
Text
184 lines
5.6 KiB
Text
# SPDX-License-Identifier: GPL-2.0
|
|
config PPC_PSERIES
|
|
depends on PPC64 && PPC_BOOK3S
|
|
bool "IBM pSeries & new (POWER5-based) iSeries"
|
|
select HAVE_PCSPKR_PLATFORM
|
|
select MPIC
|
|
select OF_DYNAMIC
|
|
select FORCE_PCI
|
|
select PCI_MSI
|
|
select PPC_XICS
|
|
select PPC_XIVE_SPAPR
|
|
select PPC_ICP_NATIVE
|
|
select PPC_ICP_HV
|
|
select PPC_ICS_RTAS
|
|
select PPC_I8259
|
|
select PPC_RTAS
|
|
select PPC_RTAS_DAEMON
|
|
select RTAS_ERROR_LOGGING
|
|
select PPC_UDBG_16550
|
|
select PPC_DOORBELL
|
|
select HOTPLUG_CPU
|
|
select FORCE_SMP
|
|
select SWIOTLB
|
|
default y
|
|
|
|
config PARAVIRT
|
|
bool
|
|
|
|
config PARAVIRT_SPINLOCKS
|
|
bool
|
|
|
|
config PARAVIRT_TIME_ACCOUNTING
|
|
select PARAVIRT
|
|
bool
|
|
|
|
config PPC_SPLPAR
|
|
bool "Support for shared-processor logical partitions"
|
|
depends on PPC_PSERIES
|
|
select PARAVIRT_SPINLOCKS if PPC_QUEUED_SPINLOCKS
|
|
select PARAVIRT_TIME_ACCOUNTING if VIRT_CPU_ACCOUNTING_GEN
|
|
default y
|
|
help
|
|
Enabling this option will make the kernel run more efficiently
|
|
on logically-partitioned pSeries systems which use shared
|
|
processors, that is, which share physical processors between
|
|
two or more partitions.
|
|
|
|
Say Y if you are unsure.
|
|
|
|
config DTL
|
|
bool "Dispatch Trace Log"
|
|
depends on PPC_SPLPAR && DEBUG_FS
|
|
help
|
|
SPLPAR machines can log hypervisor preempt & dispatch events to a
|
|
kernel buffer. Saying Y here will enable logging these events,
|
|
which are accessible through a debugfs file.
|
|
|
|
Say N if you are unsure.
|
|
|
|
config PSERIES_ENERGY
|
|
tristate "pSeries energy management capabilities driver"
|
|
depends on PPC_PSERIES
|
|
default y
|
|
help
|
|
Provides interface to platform energy management capabilities
|
|
on supported PSERIES platforms.
|
|
Provides: /sys/devices/system/cpu/pseries_(de)activation_hint_list
|
|
and /sys/devices/system/cpu/cpuN/pseries_(de)activation_hint
|
|
|
|
config IO_EVENT_IRQ
|
|
bool "IO Event Interrupt support"
|
|
depends on PPC_PSERIES
|
|
default y
|
|
help
|
|
Select this option, if you want to enable support for IO Event
|
|
interrupts. IO event interrupt is a mechanism provided by RTAS
|
|
to return information about hardware error and non-error events
|
|
which may need OS attention. RTAS returns events for multiple
|
|
event types and scopes. Device drivers can register their handlers
|
|
to receive events.
|
|
|
|
This option will only enable the IO event platform code. You
|
|
will still need to enable or compile the actual drivers
|
|
that use this infrastructure to handle IO event interrupts.
|
|
|
|
Say Y if you are unsure.
|
|
|
|
config LPARCFG
|
|
bool "LPAR Configuration Data"
|
|
depends on PPC_PSERIES
|
|
help
|
|
Provide system capacity information via human readable
|
|
<key word>=<value> pairs through a /proc/ppc64/lparcfg interface.
|
|
|
|
config PPC_PSERIES_DEBUG
|
|
depends on PPC_PSERIES && PPC_EARLY_DEBUG
|
|
bool "Enable extra debug logging in platforms/pseries"
|
|
default y
|
|
help
|
|
Say Y here if you want the pseries core to produce a bunch of
|
|
debug messages to the system log. Select this if you are having a
|
|
problem with the pseries core and want to see more of what is
|
|
going on. This does not enable debugging in lpar.c, which must
|
|
be manually done due to its verbosity.
|
|
|
|
config PPC_SMLPAR
|
|
bool "Support for shared-memory logical partitions"
|
|
depends on PPC_PSERIES
|
|
select LPARCFG
|
|
help
|
|
Select this option to enable shared memory partition support.
|
|
With this option a system running in an LPAR can be given more
|
|
memory than physically available and will allow firmware to
|
|
balance memory across many LPARs.
|
|
|
|
config CMM
|
|
tristate "Collaborative memory management"
|
|
depends on PPC_SMLPAR
|
|
select MEMORY_BALLOON
|
|
default y
|
|
help
|
|
Select this option, if you want to enable the kernel interface
|
|
to reduce the memory size of the system. This is accomplished
|
|
by allocating pages of memory and put them "on hold". This only
|
|
makes sense for a system running in an LPAR where the unused pages
|
|
will be reused for other LPARs. The interface allows firmware to
|
|
balance memory across many LPARs.
|
|
|
|
config HV_PERF_CTRS
|
|
bool "Hypervisor supplied PMU events (24x7 & GPCI)"
|
|
default y
|
|
depends on PERF_EVENTS && PPC_PSERIES
|
|
help
|
|
Enable access to hypervisor supplied counters in perf. Currently,
|
|
this enables code that uses the hcall GetPerfCounterInfo and 24x7
|
|
interfaces to retrieve counters. GPCI exists on Power 6 and later
|
|
systems. 24x7 is available on Power 8 and later systems.
|
|
|
|
If unsure, select Y.
|
|
|
|
config IBMVIO
|
|
depends on PPC_PSERIES
|
|
bool
|
|
default y
|
|
|
|
config IBMEBUS
|
|
depends on PPC_PSERIES && !CPU_LITTLE_ENDIAN
|
|
bool "Support for GX bus based adapters"
|
|
help
|
|
Bus device driver for GX bus based adapters.
|
|
|
|
config PSERIES_PLPKS
|
|
depends on PPC_PSERIES
|
|
bool "Support for the Platform Key Storage"
|
|
help
|
|
PowerVM provides an isolated Platform Keystore(PKS) storage
|
|
allocation for each LPAR with individually managed access
|
|
controls to store sensitive information securely. It can be
|
|
used to store asymmetric public keys or secrets as required
|
|
by different usecases. Select this config to enable
|
|
operating system interface to hypervisor to access this space.
|
|
|
|
If unsure, select N.
|
|
|
|
config PAPR_SCM
|
|
depends on PPC_PSERIES && MEMORY_HOTPLUG && LIBNVDIMM
|
|
tristate "Support for the PAPR Storage Class Memory interface"
|
|
help
|
|
Enable access to hypervisor provided storage class memory.
|
|
|
|
config PPC_SVM
|
|
bool "Secure virtual machine (SVM) support for POWER"
|
|
depends on PPC_PSERIES
|
|
select SWIOTLB
|
|
select ARCH_HAS_MEM_ENCRYPT
|
|
select ARCH_HAS_FORCE_DMA_UNENCRYPTED
|
|
select ARCH_HAS_CC_PLATFORM
|
|
help
|
|
There are certain POWER platforms which support secure guests using
|
|
the Protected Execution Facility, with the help of an Ultravisor
|
|
executing below the hypervisor layer. This enables support for
|
|
those guests.
|
|
|
|
If unsure, say "N".
|