Hi, I further debugged the issue of the Nexus 4 kernel not booting if memcg is enabled. This is what the memblocks on the device look like, and SPARSEMEM is turned on by default on this platform. <6>[ 0.000000] MEMBLOCK configuration: <6>[ 0.000000] memory size = 0x785ff000 reserved size = 0x11e5680 <6>[ 0.000000] memory.cnt = 0x6 <6>[ 0.000000] memory[0x0] [0x00000080200000-0x000000887fffff], 0x8600000 bytes <6>[ 0.000000] memory[0x1] [0x00000089000000-0x0000008d9fffff], 0x4a00000 bytes <6>[ 0.000000] memory[0x2] [0x0000008f700000-0x0000008fdfffff], 0x700000 bytes <6>[ 0.000000] memory[0x3] [0x0000008ff00000-0x0000008fffffff], 0x100000 bytes <6>[ 0.000000] memory[0x4] [0x00000090100000-0x0000009fdfffff], 0xfd00000 bytes <6>[ 0.000000] memory[0x5] [0x000000a3900000-0x000000fe9fefff], 0x5b0ff000 bytes <6>[ 0.000000] reserved.cnt = 0x4 <6>[ 0.000000] reserved[0x0] [0x00000080204000-0x00000080207fff], 0x4000 bytes <6>[ 0.000000] reserved[0x1] [0x000000802081c0-0x00000081292233], 0x108a074 bytes <6>[ 0.000000] reserved[0x2] [0x00000081800000-0x0000008185760b], 0x5760c bytes <6>[ 0.000000] reserved[0x3] [0x00000088700000-0x000000887fffff], 0x100000 bytes page_cgroup_init() for the SPARSEMEM case allocates sections for pfns in the range 0x82000-0xF0000 in increments of PAGES_PER_SECTION which is 0x10000. So the pfn_valid() checks for 0x90000 and 0xA0000 fail even though there is valid memory a bit further in 0x90100000 and 0xa3900000 respectively. When a lookup_page_cgroup() occurs on a page within these valid areas, and for which pfn_valid is true, section->page_cgroup is still 0 as it had not been initialized, so the resulting page_cgroup pointer points to an invalid location and causes a page fault and a kernel hang. I worked around it by forcing FLATMEM but I wonder whether the bug is in the board setup code or whether page_cgroup_init() could use a smaller granularity and not discard an entire section because at the beginning it has an address for which memblock_is_memory is false. thanks Jani -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html