oom: remove deprecated oom_adj
Subsystems (7)
PATCH 1/1 oom: remove deprecated oom_adj
The deprecated /proc/<pid>/oom_adj is scheduled for removal this month.
Signed-off-by Davidlohr Bueso <[email protected]>
--- Documentation/ABI/obsolete/proc-pid-oom_adj | 22 ----- Documentation/feature-removal-schedule.txt | 25 ------ Documentation/filesystems/proc.txt | 22 +---- fs/proc/base.c | 117 +-------------------------- include/linux/oom.h | 11 --- include/linux/sched.h | 1 - kernel/fork.c | 1 - mm/oom_kill.c | 4 +- 8 files changed, 7 insertions(+), 196 deletions(-) delete mode 100644 Documentation/ABI/obsolete/proc-pid-oom_adj
Documentation/ABI/obsolete/proc-pid-oom_adj deleted +0 -22
@@ -1,22 +0,0 @@ -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.
Documentation/feature-removal-schedule.txt +0 -25
@@ -115,31 +115,6 @@ Who: Pavel Machek <[email protected]> --------------------------- -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. - ---------------------------- - What: remove EXPORT_SYMBOL(kernel_thread) When: August 2006 Files: arch/*/kernel/*_ksyms.c
Documentation/filesystems/proc.txt +4 -18
@@ -33,7 +33,7 @@ Table of Contents 2 Modifying System Parameters 3 Per-Process Parameters - 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer + 3.1 /proc/<pid>/oom_score_adj - Adjust the oom-killer score 3.2 /proc/<pid>/oom_score - Display current oom-killer score 3.3 /proc/<pid>/io - Display the IO accounting fields
@@ -1320,10 +1320,10 @@ of the kernel. CHAPTER 3: PER-PROCESS PARAMETERS ------------------------------------------------------------------------------ -3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score +3.1 /proc/<pid>/oom_score_adj- Adjust the oom-killer score -------------------------------------------------------------------------------- -These file can be used to adjust the badness heuristic used to select which +This file can be used to adjust the badness heuristic used to select which process gets killed in out of memory conditions. The badness heuristic assigns a value to each candidate task ranging from 0
@@ -1361,22 +1361,10 @@ same system, cpuset, mempolicy, or memory controller resources to use at least equivalent to discounting 50% of the task's allowed memory from being considered as scoring against the task. -For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also -be used to tune the badness score. Its acceptable values range from -16 -(OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17 -(OOM_DISABLE) to disable oom killing entirely for that task. Its value is -scaled linearly with /proc/<pid>/oom_score_adj. - -Writing to /proc/<pid>/oom_score_adj or /proc/<pid>/oom_adj will change the -other with its scaled value. - The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last value set by a CAP_SYS_RESOURCE process. To reduce the value any lower requires CAP_SYS_RESOURCE. -NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see -Documentation/feature-removal-schedule.txt. - Caveat: when a parent task is selected, the oom killer will sacrifice any first generation children with separate address spaces instead, if possible. This avoids servers and important system daemons from being killed and loses the
@@ -1387,9 +1375,7 @@ minimal amount of work. ------------------------------------------------------------- This file can be used to check the current score used by the oom-killer is for -any given <pid>. Use it together with /proc/<pid>/oom_adj to tune which -process should be killed in an out-of-memory situation. - +any given <pid>. 3.3 /proc/<pid>/io - Display the IO accounting fields -------------------------------------------------------
fs/proc/base.c +1 -116
141 lines not on this page · raw message
include/linux/oom.h +0 -11
@@ -2,17 +2,6 @@#define __INCLUDE_LINUX_OOM_H/* -* /proc/<pid>/oom_adj is deprecated, see -* Documentation/feature-removal-schedule.txt. -* -* /proc/<pid>/oom_adj set to -17 protects from the oom-killer -*/ -#define OOM_DISABLE (-17) -/* inclusive */ -#define OOM_ADJUST_MIN (-16) -#define OOM_ADJUST_MAX 15 - -/* * /proc/<pid>/oom_score_adj set to OOM_SCORE_ADJ_MIN disables oom killing for * pid. */
include/linux/sched.h +0 -1
@@ -668,7 +668,6 @@ struct signal_struct {struct rw_semaphore group_rwsem;#endif -int oom_adj;/* OOM kill score adjustment (bit shift) */ int oom_score_adj;/* OOM kill score adjustment */ int oom_score_adj_min;/* OOM kill score adjustment minimum value. * Only settable by CAP_SYS_RESOURCE. */
kernel/fork.c +0 -1
@@ -1081,7 +1081,6 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)init_rwsem (&sig->group_rwsem);#endif - sig->oom_adj = current->signal->oom_adj; sig->oom_score_adj = current->signal->oom_score_adj; sig->oom_score_adj_min = current->signal->oom_score_adj_min;
mm/oom_kill.c +2 -2
@@ -428,8 +428,8 @@ static void dump_header(struct task_struct *p, gfp_t gfp_mask, int order, {task_lock (current);pr_warning ("%s invoked oom-killer: gfp_mask=0x%x, order=%d, " -"oom_adj=%d, oom_score_adj=%d\n" , - current->comm, gfp_mask, order, current->signal->oom_adj, +"oom_score_adj=%d\n" , + current->comm, gfp_mask, order, current->signal->oom_score_adj);cpuset_print_task_mems_allowed (current);task_unlock (current);
Signature · 9 lines
1.7.4.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 3 lines · Davidlohr Bueso
The deprecated /proc/<pid>/oom_adj is scheduled for removal this month.
Signed-off-by Davidlohr Bueso <[email protected]>
Acked-by David Rientjes <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>