[systemd-devel] implies "MemoryAccounting=true"

Gao feng gaofeng at cn.fujitsu.com
Tue Sep 10 18:18:24 PDT 2013


On 09/10/2013 11:50 PM, Lennart Poettering wrote:
> 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...
> 

Maybe we should also report "MemoryAccounting=yes" in cgroup_context_dump
if we set MemoryLimit.



More information about the systemd-devel mailing list