Subject: CGroup Swap extension in 2.6.38-rc4
From: Romain Riviere <romain.riviere@gmail.com>
Date: Mon, 14 Feb 2011 10:49:48 +0100

 Mon, 14 Feb 2011 10:49:48 +0100
Hello list,

I thought I should share this experience I've just had with the latest kernel RC and
cgroups (+ vserver of course).

Upgrading from 2.6.36, I saw this new option in the kernel config: "Memory Resource
Controller Swap Extension enabled by default" (aka CONFIG CGROUP MEM RES CTLR SWAP ENABLED).
This is set to "No" as a default, so I left it that way and booted the new kernel.

The result was a kernel in which the swap controller was indeed disabled and could not
be enabled by any means I could think of (cgroups were mounted with "-o all", no sysctl
for that option ...). In effect, this breaks cgroups and prevents your guests from starting
properly in case you have any memory.memsw limits set for them. The only solution was
to build a new kernel with CONFIG CGROUP MEM RES CTLR SWAP ENABLED set to "Yes".
Now perhaps there *is* a way to enable this particular subsys after boot, and if anyone
can find it, I'll be glad to hear about it :-)

Cheers,