Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: arm64: Repack struct kvm_pmu to reduce size

struct kvm_pmu has 2 holes using 10 bytes. This is instantiated
in all vcpus, so it adds up. Repack the structures to remove the
holes.

No functional change intended.

Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220510095710.148178-3-tabba@google.com

authored by

Fuad Tabba and committed by
Marc Zyngier
e987a4c6 3cb8a091

+2 -2
+2 -2
include/kvm/arm_pmu.h
··· 21 21 }; 22 22 23 23 struct kvm_pmu { 24 - int irq_num; 24 + struct irq_work overflow_work; 25 25 struct kvm_pmc pmc[ARMV8_PMU_MAX_COUNTERS]; 26 26 DECLARE_BITMAP(chained, ARMV8_PMU_MAX_COUNTER_PAIRS); 27 + int irq_num; 27 28 bool created; 28 29 bool irq_level; 29 - struct irq_work overflow_work; 30 30 }; 31 31 32 32 struct arm_pmu_entry {