lkml.org 
[lkml]   [2014]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v2 5/6] memcg, kmem: clean up memcg parameter handling
On Tue 04-02-14 11:32:10, Johannes Weiner wrote:
> On Tue, Feb 04, 2014 at 02:28:59PM +0100, Michal Hocko wrote:
> > memcg_kmem_newpage_charge doesn't always set the given memcg parameter.
>
> lol, I really don't get your patch order...

Ok, Ok, I've encountered this mess while double checking #2 and was too
lazy to rebasing again. I will move it to the front for the merge.

> > Some early escape paths skip setting *memcg while
> > __memcg_kmem_newpage_charge down the call chain sets *memcg even if no
> > memcg is charged due to other escape paths.
> >
> > The current code is correct because the memcg is initialized to NULL
> > at the highest level in __alloc_pages_nodemask but this all is very
> > confusing and error prone. Let's make the semantic clear and move the
> > memcg parameter initialization to the highest level of kmem accounting
> > (memcg_kmem_newpage_charge).
> >
> > Signed-off-by: Michal Hocko <mhocko@suse.cz>
>
> Patch looks good, though.
>
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>

Thanks!

--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2014-02-04 18:21    [W:0.042 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site