Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

oom: remove references to old badness() function

The badness() function in the oom killer was renamed to oom_badness() in
a63d83f427fb ("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>

authored by

David Rientjes and committed by
Linus Torvalds
11239836 6ac47520

+3 -7
+1 -1
Documentation/ABI/obsolete/proc-pid-oom_adj
··· 14 14 15 15 A much more powerful interface, /proc/<pid>/oom_score_adj, was 16 16 introduced with the oom killer rewrite that allows users to increase or 17 - decrease the badness() score linearly. This interface will replace 17 + decrease the badness score linearly. This interface will replace 18 18 /proc/<pid>/oom_adj. 19 19 20 20 A warning will be emitted to the kernel log if an application uses this
+1 -1
Documentation/feature-removal-schedule.txt
··· 184 184 185 185 A much more powerful interface, /proc/<pid>/oom_score_adj, was 186 186 introduced with the oom killer rewrite that allows users to increase or 187 - decrease the badness() score linearly. This interface will replace 187 + decrease the badness score linearly. This interface will replace 188 188 /proc/<pid>/oom_adj. 189 189 190 190 A warning will be emitted to the kernel log if an application uses this
-4
include/linux/oom.h
··· 64 64 oom_killer_disabled = false; 65 65 } 66 66 67 - /* The badness from the OOM killer */ 68 - extern unsigned long badness(struct task_struct *p, struct mem_cgroup *mem, 69 - const nodemask_t *nodemask, unsigned long uptime); 70 - 71 67 extern struct task_struct *find_lock_task_mm(struct task_struct *p); 72 68 73 69 /* sysctls */
+1 -1
mm/oom_kill.c
··· 487 487 488 488 /* 489 489 * If any of p's children has a different mm and is eligible for kill, 490 - * the one with the highest badness() score is sacrificed for its 490 + * the one with the highest oom_badness() score is sacrificed for its 491 491 * parent. This attempts to lose the minimal amount of work done while 492 492 * still freeing memory. 493 493 */