lkml.org 
[lkml]   [2021]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] KVM: arm: memcg awareness
On Wed 17-03-21 16:04:51, Wanpeng Li wrote:
> On Wed, 17 Mar 2021 at 16:04, Wanpeng Li <kernellwp@gmail.com> wrote:
> >
> > On Wed, 17 Mar 2021 at 15:57, Michal Hocko <mhocko@suse.com> wrote:
> > >
> > > On Wed 17-03-21 13:46:24, Wanpeng Li wrote:
> > > > From: Wanpeng Li <wanpengli@tencent.com>
> > > >
> > > > 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 decisions.
> > >
> > > This is a bit vague. What is the right decision? AFAICS none of that
> > > memory is considered during oom victim selection. The only thing memcg
> > > controler can help with is to contain and account this additional
> > > memory. This might help to better isolate multiple workloads on the same
> > > system. Maybe this is what you wanted to say? Or maybe this is a way to
> > > prevent untrusted users from consuming a lot of memory?
> >
>
> https://patchwork.kernel.org/project/kvm/patch/20190211190252.198101-1-bgardon@google.com/
>
> > It is explained in this patchset for x86 kvm which is upstream, I
> > think I don't need to copy and paste. :)

How is one supposed to know that? If you want to spare some typing then
you could have referenced 4183683918ef ("kvm: vmx: Add memcg accounting
to KVM allocations").

Btw. that explanation is rather vague as well. It doesn't explain any of
my above questions. It is not my take to judge whether these are
important for the respective maintainers I just want to point out that
once somebody revisits this code and try to find out why the accounting
has been added then this will be far from clear because "memcg doing the
right thing" doesn't tell much in itself.
--
Michal Hocko
SUSE Labs

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