diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/oom_kill.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index fc81cb2..859250c 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -208,8 +208,13 @@ unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem, */ points += p->signal->oom_score_adj; - if (points < 0) - return 0; + /* + * Never return 0 for an eligible task that may be killed since it's + * possible that no single user task uses more than 0.1% of memory and + * no single admin tasks uses more than 3.0%. + */ + if (points <= 0) + return 1; return (points < 1000) ? points : 1000; } |