lkml.org 
[lkml]   [2015]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] memcg: fix memory.high target
On Mon, Nov 23, 2015 at 03:22:31PM +0300, Vladimir Davydov wrote:
> When the memory.high threshold is exceeded, try_charge() schedules a
> task_work to reclaim the excess. The reclaim target is set to the number
> of pages requested by try_charge(). This is wrong, because try_charge()
> usually charges more pages than requested (batch > nr_pages) in order to
> refill per cpu stocks. As a result, a process in a cgroup can easily
> exceed memory.high significantly when doing a lot of charges w/o
> returning to userspace (e.g. reading a file in big chunks).
>
> Fix this issue by assuring that when exceeding memory.high a process
> reclaims as many pages as were actually charged (i.e. batch).
>
> Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>


\
 
 \ /
  Last update: 2015-11-23 17:41    [W:0.039 / U:1.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site