* A problem with memory.oom_control
@ 2014-04-14 11:54 Kevin Wilson
[not found] ` <CAGXs5wUdhEYQ-kGEPSD2A=OceZuA1tovLs04gPcRcqBPagQJCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Wilson @ 2014-04-14 11:54 UTC (permalink / raw)
To: cgroups-u79uwXL29TY76Z2rM5mHXA
Hello,
First I hope this mailing list is the proper one for asking the
following question:
I do the following, as root, on Fedora 20 with 3.12.7-300.fc20.x86_64 kernel:
create a cgroup called "0"
/sys/fs/cgroup/memory/0
run:
echo "1" > /sys/fs/cgroup/memory/0/memory.oom_control
bash: echo: write error: Invalid argument
Why am I having this error ?
According to the documentation:
http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt
this should work.
Regards,
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A problem with memory.oom_control
[not found] ` <CAGXs5wUdhEYQ-kGEPSD2A=OceZuA1tovLs04gPcRcqBPagQJCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-04-15 2:49 ` Li Zefan
[not found] ` <534C9E45.9090005-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-04-30 8:56 ` Michal Hocko
1 sibling, 1 reply; 5+ messages in thread
From: Li Zefan @ 2014-04-15 2:49 UTC (permalink / raw)
To: Kevin Wilson; +Cc: cgroups-u79uwXL29TY76Z2rM5mHXA
于 2014/4/14 19:54, Kevin Wilson 写道:
> Hello,
>
> First I hope this mailing list is the proper one for asking the
> following question:
> I do the following, as root, on Fedora 20 with 3.12.7-300.fc20.x86_64 kernel:
>
> create a cgroup called "0"
> /sys/fs/cgroup/memory/0
>
> run:
>
> echo "1" > /sys/fs/cgroup/memory/0/memory.oom_control
> bash: echo: write error: Invalid argument
>
> Why am I having this error ?
>
> According to the documentation:
>
> http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt
> this should work.
>
Check if /sys/fs/cgroup/memory/memory/use_hierarchy is 1, if so the failure
is an expectecd bahavior.
"This operation is only allowed to the top cgroup of a sub-hierarchy."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A problem with memory.oom_control
[not found] ` <534C9E45.9090005-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2014-04-15 4:03 ` Kevin Wilson
[not found] ` <CAGXs5wVPsdPFm5EssN3_MSSermVMoUtAqc9XTH_YVN+bkPKVyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Wilson @ 2014-04-15 4:03 UTC (permalink / raw)
To: Li Zefan; +Cc: cgroups-u79uwXL29TY76Z2rM5mHXA
Hi,
Thanks to the fast response.
Indeed:
#cat /sys/fs/cgroup/memory/memory.use_hierarchy
1
#cat /sys/fs/cgroup/memory/0/memory.use_hierarchy
1
However:
#echo 0 > /sys/fs/cgroup/memory/memory.use_hierarchy
bash: echo: write error: Device or resource busy
#echo 0 > /sys/fs/cgroup/memory/0/memory.use_hierarchy
bash: echo: write error: Invalid argument
So it seems that use_hierarchy cannot be changed via writing to sysfs
Any advice ?
Regards,
Kevin
On Tue, Apr 15, 2014 at 5:49 AM, Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> wrote:
> 于 2014/4/14 19:54, Kevin Wilson 写道:
>> Hello,
>>
>> First I hope this mailing list is the proper one for asking the
>> following question:
>> I do the following, as root, on Fedora 20 with 3.12.7-300.fc20.x86_64 kernel:
>>
>> create a cgroup called "0"
>> /sys/fs/cgroup/memory/0
>>
>> run:
>>
>> echo "1" > /sys/fs/cgroup/memory/0/memory.oom_control
>> bash: echo: write error: Invalid argument
>>
>> Why am I having this error ?
>>
>> According to the documentation:
>>
>> http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt
>> this should work.
>>
>
> Check if /sys/fs/cgroup/memory/memory/use_hierarchy is 1, if so the failure
> is an expectecd bahavior.
>
> "This operation is only allowed to the top cgroup of a sub-hierarchy."
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A problem with memory.oom_control
[not found] ` <CAGXs5wVPsdPFm5EssN3_MSSermVMoUtAqc9XTH_YVN+bkPKVyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-04-15 11:05 ` William Dauchy
0 siblings, 0 replies; 5+ messages in thread
From: William Dauchy @ 2014-04-15 11:05 UTC (permalink / raw)
To: Kevin Wilson; +Cc: Li Zefan, cgroups-u79uwXL29TY76Z2rM5mHXA
Hello Kevin,
On Tue, Apr 15, 2014 at 6:03 AM, Kevin Wilson <wkevils-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> So it seems that use_hierarchy cannot be changed via writing to sysfs
see: https://www.kernel.org/doc/Documentation/cgroups/memory.txt section6
NOTE1: Enabling/disabling will fail if either the cgroup already has other
cgroups created below it, or if the parent cgroup has use_hierarchy
enabled.
Regards,
--
William
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A problem with memory.oom_control
[not found] ` <CAGXs5wUdhEYQ-kGEPSD2A=OceZuA1tovLs04gPcRcqBPagQJCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-15 2:49 ` Li Zefan
@ 2014-04-30 8:56 ` Michal Hocko
1 sibling, 0 replies; 5+ messages in thread
From: Michal Hocko @ 2014-04-30 8:56 UTC (permalink / raw)
To: Kevin Wilson; +Cc: cgroups-u79uwXL29TY76Z2rM5mHXA
On Mon 14-04-14 14:54:23, Kevin Wilson wrote:
> Hello,
>
> First I hope this mailing list is the proper one for asking the
> following question:
> I do the following, as root, on Fedora 20 with 3.12.7-300.fc20.x86_64 kernel:
>
> create a cgroup called "0"
> /sys/fs/cgroup/memory/0
>
> run:
>
> echo "1" > /sys/fs/cgroup/memory/0/memory.oom_control
> bash: echo: write error: Invalid argument
JFYI: a patch[1] which changes this behavior is in mmotm tree already
and it will be probably merged into 3.15.
[1] https://lkml.org/lkml/2014/4/16/651
> Why am I having this error ?
>
> According to the documentation:
>
> http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt
> this should work.
>
> Regards,
> Kevin
> --
> To unsubscribe from this list: send the line "unsubscribe cgroups" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-30 8:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-14 11:54 A problem with memory.oom_control Kevin Wilson
[not found] ` <CAGXs5wUdhEYQ-kGEPSD2A=OceZuA1tovLs04gPcRcqBPagQJCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-15 2:49 ` Li Zefan
[not found] ` <534C9E45.9090005-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-04-15 4:03 ` Kevin Wilson
[not found] ` <CAGXs5wVPsdPFm5EssN3_MSSermVMoUtAqc9XTH_YVN+bkPKVyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-15 11:05 ` William Dauchy
2014-04-30 8:56 ` Michal Hocko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.