Re: [PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Shakeel Butt
On Fri, Jun 29, 2018 at 7:55 AM Michal Hocko wrote: > > On Fri 29-06-18 16:40:23, Paolo Bonzini wrote: > > On 29/06/2018 16:30, Michal Hocko wrote: > > > I am not familiar wtih kvm to judge but if we are going to account this > > > memory we will probably want to let oom_badness know how much

Re: [PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Shakeel Butt
On Fri, Jun 29, 2018 at 7:55 AM Michal Hocko wrote: > > On Fri 29-06-18 16:40:23, Paolo Bonzini wrote: > > On 29/06/2018 16:30, Michal Hocko wrote: > > > I am not familiar wtih kvm to judge but if we are going to account this > > > memory we will probably want to let oom_badness know how much

Re: [PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Paolo Bonzini
On 29/06/2018 16:55, Michal Hocko wrote: >>> I would also love to see a note how this memory is bound to the owner >>> life time in the changelog. That would make the review much more easier. >> --verbose for people that aren't well versed in linux mm, please... > Well, if the memory accounted to

Re: [PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Paolo Bonzini
On 29/06/2018 16:55, Michal Hocko wrote: >>> I would also love to see a note how this memory is bound to the owner >>> life time in the changelog. That would make the review much more easier. >> --verbose for people that aren't well versed in linux mm, please... > Well, if the memory accounted to

Re: [PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Michal Hocko
On Fri 29-06-18 16:40:23, Paolo Bonzini wrote: > On 29/06/2018 16:30, Michal Hocko wrote: > > I am not familiar wtih kvm to judge but if we are going to account this > > memory we will probably want to let oom_badness know how much memory > > to account to a specific process. Is this something

Re: [PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Michal Hocko
On Fri 29-06-18 16:40:23, Paolo Bonzini wrote: > On 29/06/2018 16:30, Michal Hocko wrote: > > I am not familiar wtih kvm to judge but if we are going to account this > > memory we will probably want to let oom_badness know how much memory > > to account to a specific process. Is this something

Re: [PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Paolo Bonzini
On 29/06/2018 16:30, Michal Hocko wrote: > I am not familiar wtih kvm to judge but if we are going to account this > memory we will probably want to let oom_badness know how much memory > to account to a specific process. Is this something that we can do? > We will probably need a new MM_KERNEL

Re: [PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Paolo Bonzini
On 29/06/2018 16:30, Michal Hocko wrote: > I am not familiar wtih kvm to judge but if we are going to account this > memory we will probably want to let oom_badness know how much memory > to account to a specific process. Is this something that we can do? > We will probably need a new MM_KERNEL

Re: [PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Michal Hocko
On Fri 29-06-18 07:02:24, 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

Re: [PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Michal Hocko
On Fri 29-06-18 07:02:24, 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

[PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Shakeel Butt
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

[PATCH v2] kvm, mm: account shadow page tables to kmemcg

2018-06-29 Thread Shakeel Butt
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