oom: make oom_score to per-process value
oom-killer kills a process, not task. Then oom_score should be calculated as per-process too. it makes consistency more and makes speed up select_bad_process(). Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Paul Menage <menage@google.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>
This commit is contained in:
committed by
Linus Torvalds
parent
28b83c5193
commit
495789a51a
@ -447,7 +447,7 @@ static int proc_oom_score(struct task_struct *task, char *buffer)
|
||||
|
||||
do_posix_clock_monotonic_gettime(&uptime);
|
||||
read_lock(&tasklist_lock);
|
||||
points = badness(task, uptime.tv_sec);
|
||||
points = badness(task->group_leader, uptime.tv_sec);
|
||||
read_unlock(&tasklist_lock);
|
||||
return sprintf(buffer, "%lu\n", points);
|
||||
}
|
||||
|
Reference in New Issue
Block a user