Thread (45 messages) 45 messages, 5 authors, 2012-07-12

Re: [patch 08/11] mm: memcg: remove needless !mm fixup to init_mm when charging

From: Michal Hocko <hidden>
Date: 2012-07-10 16:22:54
Also in: linux-mm, lkml

On Tue 10-07-12 14:54:48, Wanpeng Li wrote:
On Tue, Jul 10, 2012 at 08:21:04AM +0200, Michal Hocko wrote:
quoted
On Tue 10-07-12 14:10:21, Wanpeng Li wrote:
quoted
On Mon, Jul 09, 2012 at 05:20:58PM +0200, Michal Hocko wrote:
quoted
On Thu 05-07-12 02:45:00, Johannes Weiner wrote:
quoted
It does not matter to __mem_cgroup_try_charge() if the passed mm is
NULL or init_mm, it will charge the root memcg in either case.
You can also change the comment in __mem_cgroup_try_charge :

"if so charge the init_mm" => "if so charge the root memcg"
This is already in place:
"
If mm is NULL and the caller doesn't pass a valid memcg pointer, that is
treated as a charge to root_mem_cgroup.
"
IIUC, if still keep comment "if so charge the init_mm" is not correct,
since pages in pagecache aren't mapped into any processes' ptes, 
so mm is NULL, and these pages which in pagecache are not belong 
to init_mm, the comment should be changed. :-)
Fair enough. I guess Johannes will change that in the next post.
-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help