echo 1 > memory.oom_control bash: echo: write error: Invalid argument

Kevin Wilson wkevils at gmail.com
Mon Mar 31 07:29:40 EDT 2014


Hello,
On Fedora 20, I try the following:

1) 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:

You can disable the OOM-killer by writing "1" to memory.oom_control
file, as:754 <http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L754>
755 <http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L755>
        #echo 1 > memory.oom_control756
<http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L756>
757 <http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L757>
This operation is only allowed to the top cgroup of a
sub-hierarchy.758
<http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L758>
If OOM-killer is disabled, tasks under cgroup will hang/sleep759
<http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L759>
in memory cgroup's OOM-waitqueue when they request accountable
memory.760 <http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L760>


regards,

      Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140331/5164913e/attachment.html 


More information about the Kernelnewbies mailing list