aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/cgroups/memory.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/cgroups/memory.txt')
-rw-r--r--Documentation/cgroups/memory.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index eac22d3b2f7b..44e7ded33448 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -493,6 +493,8 @@ It's applicable for root and non-root cgroup.
493 493
49410. OOM Control 49410. OOM Control
495 495
496memory.oom_control file is for OOM notification and other controls.
497
496Memory controler implements oom notifier using cgroup notification 498Memory controler implements oom notifier using cgroup notification
497API (See cgroups.txt). It allows to register multiple oom notification 499API (See cgroups.txt). It allows to register multiple oom notification
498delivery and gets notification when oom happens. 500delivery and gets notification when oom happens.
@@ -505,6 +507,27 @@ To register a notifier, application need:
505Application will be notifier through eventfd when oom happens. 507Application will be notifier through eventfd when oom happens.
506OOM notification doesn't work for root cgroup. 508OOM notification doesn't work for root cgroup.
507 509
510You can disable oom-killer by writing "1" to memory.oom_control file.
511As.
512 #echo 1 > memory.oom_control
513
514This operation is only allowed to the top cgroup of subhierarchy.
515If oom-killer is disabled, tasks under cgroup will hang/sleep
516in memcg's oom-waitq when they request accountable memory.
517
518For running them, you have to relax the memcg's oom sitaution by
519 * enlarge limit or reduce usage.
520To reduce usage,
521 * kill some tasks.
522 * move some tasks to other group with account migration.
523 * remove some files (on tmpfs?)
524
525Then, stopped tasks will work again.
526
527At reading, current status of OOM is shown.
528 oom_kill_disable 0 or 1 (if 1, oom-killer is disabled)
529 under_oom 0 or 1 (if 1, the memcg is under OOM,tasks may
530 be stopped.)
508 531
50911. TODO 53211. TODO
510 533