mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 20:24:31 +00:00
build: Add "pmu=off" to default cpu_features option
[ port from runtime commit 41a06d4961f51af4ec4799aaee202c744584f31e ] The user sometimes doesn't care about pmu usage(e.g. perf tool profiling). But pmu will cost significant overhead on boot time and virtualization context switch. E.g. on arm64, if guest pmu is enabled, kvm should save and restore all PMU registers when guest/host switching. for dmesg comparision: Before: [ 0.007620] bus: 'platform': driver_probe_device: matched device pmu with driver armv8-pmu [ 0.007622] bus: 'platform': really_probe: probing driver armv8-pmu with device pmu [ 0.036282] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available [ 0.036285] driver: 'armv8-pmu': driver_bound: bound to device 'pmu' [ 0.036295] bus: 'platform': really_probe: bound device pmu to driver armv8-pmu After: [ 0.007935] bus: 'platform': driver_probe_device: matched device alarmtimer with driver alarmtimer [ 0.007937] bus: 'platform': really_probe: probing driver alarmtimer with device alarmtimer [ 0.007940] driver: 'alarmtimer': driver_bound: bound to device 'alarmtimer' [ 0.007944] bus: 'platform': really_probe: bound device alarmtimer to driver alarmtimer Because s390 doest support "pmu=off", keep the default CPUFEATURES to be "" instead of "pmu=off". Signed-off-by: Jia He <justin.he@arm.com> Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
parent
115dfa19cd
commit
06571f0377
@ -398,6 +398,7 @@ USER_VARS += KERNELTYPE_ACRN
|
||||
USER_VARS += KERNELTYPE_CLH
|
||||
USER_VARS += FIRMWAREPATH
|
||||
USER_VARS += MACHINEACCELERATORS
|
||||
USER_VARS += CPUFEATURES
|
||||
USER_VARS += DEFMACHINETYPE_CLH
|
||||
USER_VARS += KERNELPARAMS
|
||||
USER_VARS += LIBEXECDIR
|
||||
@ -606,6 +607,7 @@ $(GENERATED_FILES): %: %.in $(MAKEFILE_LIST) VERSION .git-commit
|
||||
-e "s|@INITRDPATH@|$(INITRDPATH)|g" \
|
||||
-e "s|@FIRMWAREPATH@|$(FIRMWAREPATH)|g" \
|
||||
-e "s|@MACHINEACCELERATORS@|$(MACHINEACCELERATORS)|g" \
|
||||
-e "s|@CPUFEATURES@|$(CPUFEATURES)|g" \
|
||||
-e "s|@FIRMWAREPATH_CLH@|$(FIRMWAREPATH_CLH)|g" \
|
||||
-e "s|@DEFMACHINETYPE_CLH@|$(DEFMACHINETYPE_CLH)|g" \
|
||||
-e "s|@KERNELPARAMS@|$(KERNELPARAMS)|g" \
|
||||
|
@ -8,6 +8,7 @@
|
||||
MACHINETYPE := pc
|
||||
KERNELPARAMS :=
|
||||
MACHINEACCELERATORS :=
|
||||
CPUFEATURES := pmu=off
|
||||
|
||||
QEMUCMD := qemu-system-x86_64
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
MACHINETYPE := virt
|
||||
KERNELPARAMS :=
|
||||
MACHINEACCELERATORS :=
|
||||
CPUFEATURES := pmu=off
|
||||
|
||||
QEMUCMD := qemu-system-aarch64
|
||||
|
||||
|
@ -8,5 +8,6 @@
|
||||
MACHINETYPE := pseries
|
||||
KERNELPARAMS :=
|
||||
MACHINEACCELERATORS := "cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken,cap-large-decr=off,cap-ccf-assist=off"
|
||||
CPUFEATURES := pmu=off
|
||||
KERNELTYPE := uncompressed #This architecture must use an uncompressed kernel.
|
||||
QEMUCMD := qemu-system-ppc64
|
||||
|
@ -8,5 +8,6 @@
|
||||
MACHINETYPE := s390-ccw-virtio
|
||||
KERNELPARAMS :=
|
||||
MACHINEACCELERATORS :=
|
||||
CPUFEATURES :=
|
||||
|
||||
QEMUCMD := qemu-system-s390x
|
||||
|
Loading…
Reference in New Issue
Block a user