[systemd-devel] [PATCH] systemd-cgroup-limits.patch

Patrascu, Cristian Cristian.Patrascu at windriver.com
Thu Jul 14 06:17:53 PDT 2011


I've changed the options, it was indeed confusing, sorry for that. 
Very good observation, Thank you!

________________________________________
From: Kok, Auke-jan H [auke-jan.h.kok at intel.com]
Sent: Thursday, July 14, 2011 12:41 AM
To: Patrascu, Cristian
Cc: lennart at poettering.net; Zaharia, Adrian; systemd-devel at lists.freedesktop.org
Subject: Re: [systemd-devel] [PATCH] systemd-cgroup-limits.patch

On Wed, Jul 13, 2011 at 12:35 AM, Patrascu, Cristian
<Cristian.Patrascu at windriver.com> wrote:
> Patch adds functionality to apply certain cgroups limits, such as shares of cpu, memory limit and blkio.
> Unit files of type Service, Mount, Swap and Socket have new options (under corresponding [Service], [Mount], [Swap], [Socket] option group ):
> - "MemoryHardLimit" accepts int64 value (considered bytes), puts the value in "memory" cgroup (if defined) in file "memory.limit_in_bytes" ;
> - "MemoryLimit" accepts int64 value (considered bytes), puts the value in "memory" cgroup (if defined) in file "memory.soft_limit_in_bytes" ;

nitpick, but still

you define MemoryHardLimit to set limit_in_bytes
you define MemoryLimit to set soft_limit_in_bytes

that's confusing, since "MemoryLimit" does not set "limit_in_bytes".

Why not just 1:1 map this to cgroup naming instead:

MemoryLimit -> limit_in_bytes
MemorySoftLimit -> soft_limit_in_bytes

seems so trivial to do that instead...

Auke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-systemd-cgroup-limits.patch
Type: text/x-patch
Size: 28012 bytes
Desc: 0001-systemd-cgroup-limits.patch
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110714/bcc837fd/attachment-0001.bin>


More information about the systemd-devel mailing list