]> git.baikalelectronics.ru Git - kernel.git/commit
memcg: do not call reclaim if !__GFP_WAIT
authorVladimir Davydov <vdavydov@parallels.com>
Wed, 10 Jun 2015 18:14:46 +0000 (11:14 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Jun 2015 23:43:43 +0000 (16:43 -0700)
commit26cbedd072d8fa4dee5416ece4b5d1d13c6d1b22
tree1b491946b967b573c0394c58032fcc38e8aeca1d
parent3e411e0a71eb40079bdb1112f68057588c6a2629
memcg: do not call reclaim if !__GFP_WAIT

When trimming memcg consumption excess (see memory.high), we call
try_to_free_mem_cgroup_pages without checking if we are allowed to sleep
in the current context, which can result in a deadlock.  Fix this.

Fixes: a5b35e42d351 ("mm: memcontrol: default hierarchy interface for memory")
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c