[PATCH v3 2/4] KVM: arm64: Repack struct kvm_pmu to reduce size

Oliver Upton oupton at google.com
Mon May 9 12:57:40 PDT 2022


On Mon, May 09, 2022 at 12:03:28PM +0000, Fuad Tabba wrote:
> struct kvm_pmu has 2 holes using 10 bytes. This is instantiated
> in all vcpus, so it adds up. This repacking removes all holes.

nit: commit messages should be written in the imperative. So maybe
'Repack the structure to remove all holes'.

> No functional change intended.
> 
> Signed-off-by: Fuad Tabba <tabba at google.com>

Otherwise:

Reviewed-by: Oliver Upton <oupton at google.com>

> ---
>  include/kvm/arm_pmu.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
> index 20193416d214..eaa8290b116f 100644
> --- a/include/kvm/arm_pmu.h
> +++ b/include/kvm/arm_pmu.h
> @@ -21,12 +21,12 @@ struct kvm_pmc {
>  };
>  
>  struct kvm_pmu {
> -	int irq_num;
> +	struct irq_work overflow_work;
>  	struct kvm_pmc pmc[ARMV8_PMU_MAX_COUNTERS];
>  	DECLARE_BITMAP(chained, ARMV8_PMU_MAX_COUNTER_PAIRS);
> +	int irq_num;
>  	bool created;
>  	bool irq_level;
> -	struct irq_work overflow_work;
>  };
>  
>  struct arm_pmu_entry {
> -- 
> 2.36.0.512.ge40c2bad7a-goog
> 
> _______________________________________________
> kvmarm mailing list
> kvmarm at lists.cs.columbia.edu
> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



More information about the linux-arm-kernel mailing list