From: Paolo Bonzini <pbonzini@redhat.com>
To: Shakeel Butt <shakeelb@google.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: "Michal Hocko" <mhocko@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Vladimir Davydov" <vdavydov.dev@gmail.com>,
"Greg Thelen" <gthelen@google.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Peter Feiner" <pfeiner@google.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
linux-mm@kvack.org, stable <stable@vger.kernel.org>
Subject: Re: [PATCH] kvm, mm: account shadow page tables to kmemcg
Date: Thu, 28 Jun 2018 09:10:07 +0200 [thread overview]
Message-ID: <ea54cd69-a04e-f514-58f1-49afa1c5cb75@redhat.com> (raw)
In-Reply-To: <20180627181349.149778-1-shakeelb@google.com>
On 27/06/2018 20:13, Shakeel Butt wrote:
> The size of kvm's shadow page tables corresponds to the size of the
> guest virtual machines on the system. Large VMs can spend a significant
> amount of memory as shadow page tables which can not be left as system
> memory overhead. So, account shadow page tables to the kmemcg.
>
> Signed-off-by: Shakeel Butt <shakeelb@google.com>
> ---
> arch/x86/kvm/mmu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
> index d594690d8b95..c79a398300f5 100644
> --- a/arch/x86/kvm/mmu.c
> +++ b/arch/x86/kvm/mmu.c
> @@ -890,7 +890,7 @@ static int mmu_topup_memory_cache_page(struct kvm_mmu_memory_cache *cache,
> if (cache->nobjs >= min)
> return 0;
> while (cache->nobjs < ARRAY_SIZE(cache->objects)) {
> - page = (void *)__get_free_page(GFP_KERNEL);
> + page = (void *)__get_free_page(GFP_KERNEL|__GFP_ACCOUNT);
> if (!page)
> return -ENOMEM;
> cache->objects[cache->nobjs++] = page;
>
Queued, with
Cc: stable@vger.kernel.org
Thanks,
Paolo
prev parent reply other threads:[~2018-06-28 7:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 18:13 Shakeel Butt
2018-06-28 7:10 ` Paolo Bonzini [this message]
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=ea54cd69-a04e-f514-58f1-49afa1c5cb75@redhat.com \
--to=pbonzini@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=pfeiner@google.com \
--cc=rkrcmar@redhat.com \
--cc=shakeelb@google.com \
--cc=stable@vger.kernel.org \
--cc=vdavydov.dev@gmail.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