Преглед изворни кода

oom: move badness() declaration into oom.h

Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton пре 15 година
родитељ
комит
74bcbf4054
2 измењених фајлова са 6 додато и 3 уклоњено
  1. 0 3
      fs/proc/base.c
  2. 6 0
      include/linux/oom.h

+ 0 - 3
fs/proc/base.c

@@ -427,9 +427,6 @@ static const struct file_operations proc_lstats_operations = {
 
 
 #endif
 #endif
 
 
-/* The badness from the OOM killer */
-unsigned long badness(struct task_struct *p, struct mem_cgroup *mem,
-		      nodemask_t *nodemask, unsigned long uptime);
 static int proc_oom_score(struct task_struct *task, char *buffer)
 static int proc_oom_score(struct task_struct *task, char *buffer)
 {
 {
 	unsigned long points = 0;
 	unsigned long points = 0;

+ 6 - 0
include/linux/oom.h

@@ -14,6 +14,8 @@
 
 
 struct zonelist;
 struct zonelist;
 struct notifier_block;
 struct notifier_block;
+struct mem_cgroup;
+struct task_struct;
 
 
 /*
 /*
  * Types of limitations to the nodes from which allocations may occur
  * Types of limitations to the nodes from which allocations may occur
@@ -45,6 +47,10 @@ static inline void oom_killer_enable(void)
 	oom_killer_disabled = false;
 	oom_killer_disabled = false;
 }
 }
 
 
+/* The badness from the OOM killer */
+extern unsigned long badness(struct task_struct *p, struct mem_cgroup *mem,
+		      const nodemask_t *nodemask, unsigned long uptime);
+
 /* sysctls */
 /* sysctls */
 extern int sysctl_oom_dump_tasks;
 extern int sysctl_oom_dump_tasks;
 extern int sysctl_oom_kill_allocating_task;
 extern int sysctl_oom_kill_allocating_task;