mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 13:51:44 +00:00
11239836c0
The badness() function in the oom killer was renamed to oom_badness() in
a63d83f427
("oom: badness heuristic rewrite") since it is a globally
exported function for clarity.
The prototype for the old function still existed in linux/oom.h, so remove
it. There are no existing users.
Also fixes documentation and comment references to badness() and adjusts
them accordingly.
Signed-off-by: David Rientjes <rientjes@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
What: /proc/<pid>/oom_adj
|
|
When: August 2012
|
|
Why: /proc/<pid>/oom_adj allows userspace to influence the oom killer's
|
|
badness heuristic used to determine which task to kill when the kernel
|
|
is out of memory.
|
|
|
|
The badness heuristic has since been rewritten since the introduction of
|
|
this tunable such that its meaning is deprecated. The value was
|
|
implemented as a bitshift on a score generated by the badness()
|
|
function that did not have any precise units of measure. With the
|
|
rewrite, the score is given as a proportion of available memory to the
|
|
task allocating pages, so using a bitshift which grows the score
|
|
exponentially is, thus, impossible to tune with fine granularity.
|
|
|
|
A much more powerful interface, /proc/<pid>/oom_score_adj, was
|
|
introduced with the oom killer rewrite that allows users to increase or
|
|
decrease the badness score linearly. This interface will replace
|
|
/proc/<pid>/oom_adj.
|
|
|
|
A warning will be emitted to the kernel log if an application uses this
|
|
deprecated interface. After it is printed once, future warnings will be
|
|
suppressed until the kernel is rebooted.
|