lkml.org 
[lkml]   [2021]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] KVM: arm: memcg awareness
Date
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 = (kvm_pte_t *)get_zeroed_page(GFP_KERNEL_ACCOUNT);
> No, this is wrong.
>
> You cannot account the hypervisor page tables to the guest because we
> don't ever unmap them, and that we can't distinguish two data
> structures from two different VMs occupying the same page.

If you never unmap them, there should at least be a shrinker to get rid
of unused pages in the event of memory pressure.

Paolo

\
 
 \ /
  Last update: 2021-03-17 11:41    [W:0.092 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site