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

From: Oliver Upton
Date: Tue Sep 07 2021 - 21:21:58 EST


On Tue, Sep 7, 2021 at 7:33 AM Jia He <justin.he@xxxxxxx> 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@xxxxxxx>
> ---
> 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@xxxxxxxxxx>