Patchwork CONFIG_CGROUP_MEM_RES_CTLR=y hang on Nexus 4

login
register
mail settings
Submitter Jani Monoses
Date June 3, 2013, 10:44 a.m.
Message ID <kohs1q$o7c$1@ger.gmane.org>
Download mbox | patch
Permalink /patch/248232/
State New
Headers show

Comments

Jani Monoses - June 3, 2013, 10:44 a.m.
Hello,

If we want to set memory limits for LXC containers we need memcg turned 
on, but enabling it in the Nexus 4 kernel causes a hang on boot and a 
stacktrace can be produced [1]. The explanation I came up with is in the 
second posting to the cgroup mailing list [2] . Since neither email got 
an answer from the cgroup developers I hope someone here can offer an 
opinion.


A workaround consists in enabling FLATMEM instead of SPARSEMEM
using the patch below. Can this have any ill-effects apart from 
apparently using up 1M extra for cgroup accounting overhead?

commit 6422531ae224d73b55e8fa095d1c7405651eabac
Author: Jani Monoses <jani@ubuntu.com>
Date: Mon Apr 29 16:31:27 2013 +0300

    Use FLATMEM to allow booting with memory cgroups on

    The memory cgroups setup when sparsemem is enabled is not
    working well with the layout of the mako hardware memory blocks
    and causes a page fault when booting. This works around the bug
    which may be either in the cgroups or mako hw setup code.

    Change-Id: I3bf34bc5e2cff25e613595bc8bff06c81b711198
    Signed-off-by: Jani Monoses <jani@ubuntu.com>


[1] http://permalink.gmane.org/gmane.linux.kernel.cgroups/6590
[2] http://permalink.gmane.org/gmane.linux.kernel.cgroups/7003

Patch

diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index d982156..ae95fdc 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -163,9 +163,7 @@  config ARCH_MSM8960
        select MSM_SPM_V2
        select MSM_L2_SPM
        select MSM_NATIVE_RESTART
- select DONT_MAP_HOLE_AFTER_MEMBANK0
        select MSM_REMOTE_SPINLOCK_SFPB
- select ARCH_SPARSEMEM_ENABLE
        select ARCH_HAS_HOLES_MEMORYMODEL
        select CLEANCACHE
        select QCACHE
@@ -199,9 +197,7 @@  config ARCH_MSM8930
        select MSM_SPM_V2
        select MSM_L2_SPM
        select MSM_NATIVE_RESTART
- select DONT_MAP_HOLE_AFTER_MEMBANK0
        select MSM_REMOTE_SPINLOCK_SFPB
- select ARCH_SPARSEMEM_ENABLE
        select ARCH_HAS_HOLES_MEMORYMODEL
        select MSM_ULTRASOUND
        select MULTI_IRQ_HANDLER