Re: [PATCH] KVM: arm: memcg awareness

2021-03-17 Thread Marc Zyngier
On Wed, 17 Mar 2021 10:55:00 +, Paolo Bonzini wrote: > > On 17/03/21 11:53, Marc Zyngier wrote: > > On Wed, 17 Mar 2021 10:40:23 +, > > Paolo Bonzini wrote: > >> > >> On 17/03/21 10:10, Marc Zyngier wrote: > @@ -366,7 +366,7 @@ static int hyp_map_walker(u64 addr, u64 end, u32 > >>

Re: [PATCH] KVM: arm: memcg awareness

2021-03-17 Thread Paolo Bonzini
On 17/03/21 11:53, Marc Zyngier wrote: On Wed, 17 Mar 2021 10:40:23 +, Paolo Bonzini wrote: On 17/03/21 10:10, Marc Zyngier wrote: @@ -366,7 +366,7 @@ static int hyp_map_walker(u64 addr, u64 end, u32 level, kvm_pte_t *ptep, if (WARN_ON(level == KVM_PGTABLE_MAX_LEVELS - 1))

Re: [PATCH] KVM: arm: memcg awareness

2021-03-17 Thread Marc Zyngier
On Wed, 17 Mar 2021 10:40:23 +, Paolo Bonzini wrote: > > On 17/03/21 10:10, Marc Zyngier wrote: > >> @@ -366,7 +366,7 @@ static int hyp_map_walker(u64 addr, u64 end, u32 > >> level, kvm_pte_t *ptep, > >>if (WARN_ON(level == KVM_PGTABLE_MAX_LEVELS - 1)) > >>return -EINVAL; > >

Re: [PATCH] KVM: arm: memcg awareness

2021-03-17 Thread Paolo Bonzini
On 17/03/21 10:10, Marc Zyngier wrote: @@ -366,7 +366,7 @@ static int hyp_map_walker(u64 addr, u64 end, u32 level, kvm_pte_t *ptep, if (WARN_ON(level == KVM_PGTABLE_MAX_LEVELS - 1)) return -EINVAL; - childp = (kvm_pte_t *)get_zeroed_page(GFP_KERNEL); + childp =

Re: [PATCH] KVM: arm: memcg awareness

2021-03-17 Thread Michal Hocko
On Wed 17-03-21 16:04:51, Wanpeng Li wrote: > On Wed, 17 Mar 2021 at 16:04, Wanpeng Li wrote: > > > > On Wed, 17 Mar 2021 at 15:57, Michal Hocko wrote: > > > > > > On Wed 17-03-21 13:46:24, Wanpeng Li wrote: > > > > From: Wanpeng Li > > > > > > > > KVM allocations in the arm kvm code which are t

Re: [PATCH] KVM: arm: memcg awareness

2021-03-17 Thread Marc Zyngier
On Wed, 17 Mar 2021 08:04:20 +, Wanpeng Li wrote: > > On Wed, 17 Mar 2021 at 15:57, Michal Hocko wrote: > > > > On Wed 17-03-21 13:46:24, Wanpeng Li wrote: > > > From: Wanpeng Li > > > > > > KVM allocations in the arm kvm code which are tied to the life > > > of the VM process should be cha

Re: [PATCH] KVM: arm: memcg awareness

2021-03-17 Thread Marc Zyngier
On Wed, 17 Mar 2021 05:46:24 +, Wanpeng Li wrote: > > From: Wanpeng Li > > KVM allocations in the arm kvm code which are tied to the life > of the VM process should be charged to the VM process's cgroup. > This will help the memcg controler to do the right decisions. > > Signed-off-by: Wa

Re: [PATCH] KVM: arm: memcg awareness

2021-03-17 Thread Wanpeng Li
On Wed, 17 Mar 2021 at 16:04, Wanpeng Li wrote: > > On Wed, 17 Mar 2021 at 15:57, Michal Hocko wrote: > > > > On Wed 17-03-21 13:46:24, Wanpeng Li wrote: > > > From: Wanpeng Li > > > > > > KVM allocations in the arm kvm code which are tied to the life > > > of the VM process should be charged to

Re: [PATCH] KVM: arm: memcg awareness

2021-03-17 Thread Wanpeng Li
On Wed, 17 Mar 2021 at 15:57, Michal Hocko wrote: > > On Wed 17-03-21 13:46:24, Wanpeng Li wrote: > > From: Wanpeng Li > > > > KVM allocations in the arm kvm code which are tied to the life > > of the VM process should be charged to the VM process's cgroup. > > How much memory are we talking abou

Re: [PATCH] KVM: arm: memcg awareness

2021-03-17 Thread Michal Hocko
On Wed 17-03-21 13:46:24, Wanpeng Li wrote: > From: Wanpeng Li > > KVM allocations in the arm kvm code which are tied to the life > of the VM process should be charged to the VM process's cgroup. How much memory are we talking about? > This will help the memcg controler to do the right decisio

[PATCH] KVM: arm: memcg awareness

2021-03-16 Thread Wanpeng Li
From: Wanpeng Li KVM allocations in the arm kvm code which are tied to the life of the VM process should be charged to the VM process's cgroup. This will help the memcg controler to do the right decisions. Signed-off-by: Wanpeng Li --- arch/arm64/kvm/arm.c | 5 +++-- arch/arm64