diff options
author | David Rientjes <rientjes@google.com> | 2012-11-12 20:53:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-16 13:15:35 -0500 |
commit | fa0cbbf145aabbf29c6f28f8a11935c0b0fd86fc (patch) | |
tree | fd2626b68b0f78afa128d7772c49f066e339bd3a /Documentation | |
parent | f4bcd79c88d25508643084e6fed25920485db0eb (diff) |
mm, oom: reintroduce /proc/pid/oom_adj
This is mostly a revert of 01dc52ebdf47 ("oom: remove deprecated oom_adj")
from Davidlohr Bueso.
It reintroduces /proc/pid/oom_adj for backwards compatibility with earlier
kernels. It simply scales the value linearly when /proc/pid/oom_score_adj
is written.
The major difference is that its scheduled removal is no longer included
in Documentation/feature-removal-schedule.txt. We do warn users with a
single printk, though, to suggest the more powerful and supported
/proc/pid/oom_score_adj interface.
Reported-by: Artem S. Tashkinov <t.artem@lycos.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/filesystems/proc.txt | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a1793d670cd0..3844d21d6ca3 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -33,7 +33,7 @@ Table of Contents | |||
33 | 2 Modifying System Parameters | 33 | 2 Modifying System Parameters |
34 | 34 | ||
35 | 3 Per-Process Parameters | 35 | 3 Per-Process Parameters |
36 | 3.1 /proc/<pid>/oom_score_adj - Adjust the oom-killer | 36 | 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer |
37 | score | 37 | score |
38 | 3.2 /proc/<pid>/oom_score - Display current oom-killer score | 38 | 3.2 /proc/<pid>/oom_score - Display current oom-killer score |
39 | 3.3 /proc/<pid>/io - Display the IO accounting fields | 39 | 3.3 /proc/<pid>/io - Display the IO accounting fields |
@@ -1320,10 +1320,10 @@ of the kernel. | |||
1320 | CHAPTER 3: PER-PROCESS PARAMETERS | 1320 | CHAPTER 3: PER-PROCESS PARAMETERS |
1321 | ------------------------------------------------------------------------------ | 1321 | ------------------------------------------------------------------------------ |
1322 | 1322 | ||
1323 | 3.1 /proc/<pid>/oom_score_adj- Adjust the oom-killer score | 1323 | 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score |
1324 | -------------------------------------------------------------------------------- | 1324 | -------------------------------------------------------------------------------- |
1325 | 1325 | ||
1326 | This file can be used to adjust the badness heuristic used to select which | 1326 | These file can be used to adjust the badness heuristic used to select which |
1327 | process gets killed in out of memory conditions. | 1327 | process gets killed in out of memory conditions. |
1328 | 1328 | ||
1329 | The badness heuristic assigns a value to each candidate task ranging from 0 | 1329 | The badness heuristic assigns a value to each candidate task ranging from 0 |
@@ -1361,6 +1361,12 @@ same system, cpuset, mempolicy, or memory controller resources to use at least | |||
1361 | equivalent to discounting 50% of the task's allowed memory from being considered | 1361 | equivalent to discounting 50% of the task's allowed memory from being considered |
1362 | as scoring against the task. | 1362 | as scoring against the task. |
1363 | 1363 | ||
1364 | For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also | ||
1365 | be used to tune the badness score. Its acceptable values range from -16 | ||
1366 | (OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17 | ||
1367 | (OOM_DISABLE) to disable oom killing entirely for that task. Its value is | ||
1368 | scaled linearly with /proc/<pid>/oom_score_adj. | ||
1369 | |||
1364 | The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last | 1370 | The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last |
1365 | value set by a CAP_SYS_RESOURCE process. To reduce the value any lower | 1371 | value set by a CAP_SYS_RESOURCE process. To reduce the value any lower |
1366 | requires CAP_SYS_RESOURCE. | 1372 | requires CAP_SYS_RESOURCE. |
@@ -1375,7 +1381,9 @@ minimal amount of work. | |||
1375 | ------------------------------------------------------------- | 1381 | ------------------------------------------------------------- |
1376 | 1382 | ||
1377 | This file can be used to check the current score used by the oom-killer is for | 1383 | This file can be used to check the current score used by the oom-killer is for |
1378 | any given <pid>. | 1384 | any given <pid>. Use it together with /proc/<pid>/oom_score_adj to tune which |
1385 | process should be killed in an out-of-memory situation. | ||
1386 | |||
1379 | 1387 | ||
1380 | 3.3 /proc/<pid>/io - Display the IO accounting fields | 1388 | 3.3 /proc/<pid>/io - Display the IO accounting fields |
1381 | ------------------------------------------------------- | 1389 | ------------------------------------------------------- |