CONFIG_CGROUP_MEM_RES_CTLR=y hang on Nexus 4

Jani Monoses jani at ubuntu.com
Mon Jun 3 10:44:10 UTC 2013


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 at 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 at ubuntu.com>

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

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





More information about the kernel-team mailing list