[lkml]   [2015]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH] memcg: make CONFIG_MEMCG depend on CONFIG_MMU
On Wed 04-03-15 13:21:26, Andrew Morton wrote:
> On Wed, 4 Mar 2015 16:13:01 -0500 Johannes Weiner <> wrote:
> > I don't even care about NOMMU, this is just wrong on principle.
> Agree. And I do care about nommu ;)
> If some nommu person wants to start using memcg and manages to get it
> doing something useful then good for them - we end up with a better
> kernel. We shouldn't go and rule this out without having even tried it.

Fair enough, but shouldn't we be explicit (and honest) that the
configuration is currently broken and hardly usable?

Would it make sense to make MEMCG depend on BROKEN for !MMU? If somebody
really has an usecase then dependency on BROKEN would suggest there is a
work to be done before it is enabled for his/her configuration. I would
expect such a user would send us an email when noticing this and submit
a bug report so that we can help making it work.
From 3707f445ebd21d10c076f0cb2446a0732cf6c3bb Mon Sep 17 00:00:00 2001
From: Michal Hocko <>
Date: Wed, 4 Mar 2015 10:48:47 +0100
Subject: [PATCH] memcg: mark CONFIG_MEMCG broken for !CONFIG_MMU

CONFIG_MEMCG might be currently enabled also for !MMU architectures
which was probably an omission because Balbir had this on the TODO
list section (
Only when CONFIG_MMU is enabled, is the virtual address space control
enabled. Should we do this for nommu cases as well? My suspicion is
that we don't have to.
I do not see any traces for !MMU requests after then. The code compiles
with !MMU but I haven't heard about anybody using it in the real life
so it is not clear to me whether it works and it is usable at all. At
least anonymous mmaps do not try to charge the memory and who knows what
else is broken.

Let's make CONFIG_MEMCG depend on BROKEN for !CONFIG_MMU to make the
current status explicit for somebody who might be interested in using
MEMCG and report it to us so that we can help with fixing it up.

Signed-off-by: Michal Hocko <>
init/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/init/Kconfig b/init/Kconfig
index 9afb971497f4..f5373c4188c0 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -979,6 +979,7 @@ config MEMCG
bool "Memory Resource Controller for Control Groups"
select EVENTFD
+ depends on MMU || BROKEN
Provides a memory resource controller that manages both anonymous
memory and page cache. (See Documentation/cgroups/memory.txt)
Michal Hocko

 \ /
  Last update: 2015-03-05 14:01    [W:0.037 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site