Skip to content

Commit

Permalink
oom: move badness() declaration into oom.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Aug 10, 2010
1 parent cef1d35 commit 74bcbf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,6 @@ static const struct file_operations proc_lstats_operations = {

#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)
{
unsigned long points = 0;
Expand Down
6 changes: 6 additions & 0 deletions include/linux/oom.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

struct zonelist;
struct notifier_block;
struct mem_cgroup;
struct task_struct;

/*
* Types of limitations to the nodes from which allocations may occur
Expand Down Expand Up @@ -45,6 +47,10 @@ static inline void oom_killer_enable(void)
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 */
extern int sysctl_oom_dump_tasks;
extern int sysctl_oom_kill_allocating_task;
Expand Down

0 comments on commit 74bcbf4

Please sign in to comment.