[PATCH v2 1/2] KVM: arm64: vgic: Add memcg accounting to vgic allocations

Oliver Upton oupton at google.com
Tue Sep 7 18:21:40 PDT 2021


On Tue, Sep 7, 2021 at 7:33 AM Jia He <justin.he at arm.com> wrote:
>
> Inspired by commit 254272ce6505 ("kvm: x86: Add memcg accounting to KVM
> allocations"), it would be better to make arm64 vgic consistent with
> common kvm codes.
>
> The memory allocations of VM scope should be charged into VM process
> cgroup, hence change GFP_KERNEL to GFP_KERNEL_ACCOUNT.
>
> There remain a few cases since these allocations are global, not in VM
> scope.
>
> Signed-off-by: Jia He <justin.he at arm.com>
> ---
>  arch/arm64/kvm/vgic/vgic-init.c    |  2 +-
>  arch/arm64/kvm/vgic/vgic-irqfd.c   |  2 +-
>  arch/arm64/kvm/vgic/vgic-its.c     | 14 +++++++-------
>  arch/arm64/kvm/vgic/vgic-mmio-v3.c |  2 +-
>  arch/arm64/kvm/vgic/vgic-v4.c      |  2 +-
>  5 files changed, 11 insertions(+), 11 deletions(-)
>

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



More information about the linux-arm-kernel mailing list