Re: [PATCH -v2 5/6] memcg, kmem: clean up memcg parameter handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...

> 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@xxxxxxx>

Patch looks good, though.

Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]