lkml.org 
[lkml]   [2015]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/2] Fix memcg/memory.high in case kmem accounting is enabled
On Sun 30-08-15 22:02:16, Vladimir Davydov wrote:
> Hi,
>
> Tejun reported that sometimes memcg/memory.high threshold seems to be
> silently ignored if kmem accounting is enabled:
>
> http://www.spinics.net/lists/linux-mm/msg93613.html
>
> It turned out that both SLAB and SLUB try to allocate without __GFP_WAIT
> first. As a result, if there is enough free pages, memcg reclaim will
> not get invoked on kmem allocations, which will lead to uncontrollable
> growth of memory usage no matter what memory.high is set to.

Right but isn't that what the caller explicitly asked for? Why should we
ignore that for kmem accounting? It seems like a fix at a wrong layer to
me. Either we should start failing GFP_NOWAIT charges when we are above
high wmark or deploy an additional catchup mechanism as suggested by
Tejun. I like the later more because it allows to better handle GFP_NOFS
requests as well and there are many sources of these from kmem paths.

> This patch set attempts to fix this issue. For more details please see
> comments to individual patches.
>
> Thanks,
>
> Vladimir Davydov (2):
> mm/slab: skip memcg reclaim only if in atomic context
> mm/slub: do not bypass memcg reclaim for high-order page allocation
>
> mm/slab.c | 32 +++++++++++---------------------
> mm/slub.c | 24 +++++++++++-------------
> 2 files changed, 22 insertions(+), 34 deletions(-)
>
> --
> 2.1.4

--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2015-08-31 15:41    [W:0.144 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site