[systemd-devel] implies "MemoryAccounting=true"

Lennart Poettering lennart at poettering.net
Tue Sep 10 08:50:57 PDT 2013


On Mon, 26.08.13 11:19, Gao feng (gaofeng at cn.fujitsu.com) wrote:

> Hi
> 
> The SYSTEMD.CGROUP(5) said if MemoryLimit=bytes is set for unit, it
> implies MemeoryAccounting=true for this unit.
> 
> But seems systemd didn't implement this hint. CPUShares & BlockIO have
> the same problem, this is a shortage? patch needed?


The logic for this is in src/core/cgroup.c's cgroup_context_get_mask()
call, which will determine to which cgroup controllers to add a unit
to. Note that setting MemoryLimit= will not actually propagate to the
boolean exposed in MemoryAccounting=, it will just have the same effect
as if it was set...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list