lkml.org 
[lkml]   [2014]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH mmotm/next] vmscan-memcg-always-use-swappiness-of-the-reclaimed-memcg-swappiness-and-o om-control-fix.patch
mem_cgroup_swappiness() oopses immediately when
booted with cgroup_disable=memory. Fix that in the obvious inelegant
way for now - though I hope we are moving towards a world in which
almost all of the mem_cgroup_disabled() tests will vanish, with a
root_mem_cgroup which can handle the basics even when disabled.

Signed-off-by: Hugh Dickins <hughd@google.com>
---

mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- mmotm/mm/memcontrol.c 2014-05-21 18:12:18.072022438 -0700
+++ linux/mm/memcontrol.c 2014-05-21 19:34:30.608546905 -0700
@@ -1531,7 +1531,7 @@ static unsigned long mem_cgroup_margin(s
int mem_cgroup_swappiness(struct mem_cgroup *memcg)
{
/* root ? */
- if (!memcg->css.parent)
+ if (mem_cgroup_disabled() || !memcg->css.parent)
return vm_swappiness;

return memcg->swappiness;

\
 
 \ /
  Last update: 2014-05-28 00:21    [W:0.061 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site