[systemd-devel] [PATCH] cgroup: After MemmoryAccounting=yes running scope has no memusage

Stef Walter stef at thewalter.net
Wed Apr 9 22:54:19 PDT 2014


On 09.04.2014 23:45, Lennart Poettering wrote:
> On Tue, 08.04.14 12:11, Stef Walter (stef at thewalter.net) wrote:
> 
>> Setting the 'MemoryAccounting' unit property to true, puts the
>> unit into the right cgroup but does the memory.usage_in_bytes
>> does not reflect the pages already allocated to the processes
>> in that cgroup.
>>
>> This is because the memory.move_charge_at_immigrate needs to be
>> set before migrating processes to the new cgroup memory
>> controller path:
>>
>> https://www.kernel.org/doc/Documentation/cgroups/memory.txt
>>
>> The attached path sets the memory.move_charge_at_immigrate to
>> 0x01 | 0x02 before migrating processes to a new memory cgroup.
> 
> To keep the list posted about this: we talked to the cgroup kernel guys
> about this and while it appears like the right thing to do this the
> kernel logic behind the option doesn't work correctly, and hence we
> shouldn't do this for now. And it appears likely that when the kernel
> fixes the behaviour it will be turned on by default anyway, without
> involving userspace.
> 
> Stef, is that a big problem for you? Not sure what else we can do about
> this for now though...

Yeah, this prevents us from displaying the amount of memory used by a
unit (or container) without first restarting it :S

But you can't gold plate a turd... So we probably have to expose the
limitations of the underlying stuff rather than work around them.

Stef

-- 

stef at thewalter.net
http://stef.thewalter.net


More information about the systemd-devel mailing list