[systemd-devel] [PATCH] core: don't complain if cgroup property is missing

Umut Tezduyar Lindskog umut at tezduyar.com
Fri Aug 15 00:12:53 PDT 2014


On Fri, Aug 15, 2014 at 2:45 AM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Fri, 15.08.14 02:42, Lennart Poettering (lennart at poettering.net) wrote:
>
>>
>> On Tue, 15.07.14 11:53, Umut Tezduyar Lindskog (umut.tezduyar at axis.com) wrote:
>>
>> Looks Ok, but doesn't apply to currently git anymore...
>
> (In case this wasn't clear, please rebase and I'll commit this. -- Or
> actually, could you add a short comment explaining that EACCES is what
> the kernel returns if CFS quotas are disabled?)

Hi,

I think there is a misunderstanding. Cgroup properties do not exist if
they are turned off. And since your concern is EACCESS, I think a
"file exists?" check inside cg_set_attribute before we call
"write_string_file" is more proper in this case.

Thanks, Umut

Following is an example system with only few attributes enabled.

[root at axis-00408cc00000 /sys/fs/cgroup/cpu]26687# ls -al
drwxr-xr-x    2 root     root             0 Aug 14 12:44 .
drwxr-xr-x    4 root     root           120 Aug 14 12:44 ..
-rw-r--r--    1 root     root             0 Aug 14 12:44 cgroup.clone_children
-rw-r--r--    1 root     root             0 Aug 15 07:03 cgroup.procs
-r--r--r--    1 root     root             0 Aug 14 12:44 cgroup.sane_behavior
-rw-r--r--    1 root     root             0 Aug 14 12:44 cpu.shares
-r--r--r--    1 root     root             0 Aug 14 12:44 cpuacct.stat
-rw-r--r--    1 root     root             0 Aug 14 12:44 cpuacct.usage
-r--r--r--    1 root     root             0 Aug 14 12:44 cpuacct.usage_percpu
-rw-r--r--    1 root     root             0 Aug 14 12:44 notify_on_release
-rw-r--r--    1 root     root             0 Aug 14 12:44 release_agent
-rw-r--r--    1 root     root             0 Aug 14 12:44 tasks


>
> Lennart
>
> --
> Lennart Poettering, Red Hat
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list