From: Paolo Bonzini <pbonzini@redhat.com>
To: Marc Zyngier <maz@kernel.org>, Wanpeng Li <kernellwp@gmail.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Ben Gardon <bgardon@google.com>,
Shakeel Butt <shakeelb@google.com>
Subject: Re: [PATCH] KVM: arm: memcg awareness
Date: Wed, 17 Mar 2021 11:40:23 +0100 [thread overview]
Message-ID: <e5fce698-9e21-5c71-c99b-a9af3f213e8f@redhat.com> (raw)
In-Reply-To: <87mtv2i1s3.wl-maz@kernel.org>
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
next prev parent reply other threads:[~2021-03-17 10:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-17 5:46 Wanpeng Li
2021-03-17 7:57 ` Michal Hocko
2021-03-17 8:04 ` Wanpeng Li
2021-03-17 8:04 ` Wanpeng Li
2021-03-17 9:44 ` Michal Hocko
2021-03-17 9:15 ` Marc Zyngier
2021-03-17 9:10 ` Marc Zyngier
2021-03-17 10:40 ` Paolo Bonzini [this message]
2021-03-17 10:53 ` Marc Zyngier
2021-03-17 10:55 ` Paolo Bonzini
2021-03-17 11:03 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5fce698-9e21-5c71-c99b-a9af3f213e8f@redhat.com \
--to=pbonzini@redhat.com \
--cc=bgardon@google.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=shakeelb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®