<div dir="ltr">Hello,<div>On Fedora 20, I try the following:</div><div><div><br></div><div>1) create a cgroup called &quot;0&quot;</div><div>/sys/fs/cgroup/memory/0<br></div><div>run:</div><div><br></div><div><div>echo &quot;1&quot; &gt; /sys/fs/cgroup/memory/0/memory.oom_control </div>
<div>bash: echo: write error: Invalid argument</div><div><br></div></div></div><div>Why am I having this error  ?</div><div><br></div><div>According to the documentation:</div><div><br></div><div><a href="http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt">http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt</a>:<br>
</div><div><pre style="font-family:Monaco,&#39;Courier New&#39;,Courier,monospace;font-size:0.95em;padding:1em;color:rgb(120,120,120);overflow:auto;font-weight:bold">You can disable the OOM-killer by writing &quot;1&quot; to memory.oom_control file, as:
<a name="L754" href="http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L754" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">754</a> 
<a name="L755" href="http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L755" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">755</a>         #echo 1 &gt; memory.oom_control
<a name="L756" href="http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L756" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">756</a> 
<a name="L757" href="http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L757" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">757</a> This operation is only allowed to the top cgroup of a sub-hierarchy.
<a name="L758" href="http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L758" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">758</a> If OOM-killer is disabled, tasks under cgroup will hang/sleep
<a name="L759" href="http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L759" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">759</a> in memory cgroup&#39;s OOM-waitqueue when they request accountable memory.
<a name="L760" href="http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt#L760" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">760</a> </pre>
<pre style="font-family:Monaco,&#39;Courier New&#39;,Courier,monospace;font-size:0.95em;padding:1em;color:rgb(120,120,120);overflow:auto;font-weight:bold"><span style="font-family:arial;font-size:small;font-weight:normal;color:rgb(34,34,34)"><br>
</span></pre><pre style="font-family:Monaco,&#39;Courier New&#39;,Courier,monospace;font-size:0.95em;padding:1em;color:rgb(120,120,120);overflow:auto;font-weight:bold"><span style="font-family:arial;font-size:small;font-weight:normal;color:rgb(34,34,34)">regards,</span><br>
</pre></div><div>      Kevin</div></div>