Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210905
b: refs/heads/master
c: f19e8aa
h: refs/heads/master
i:
  210903: 6275761
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Sep 23, 2010
1 parent cf13fb5 commit 04724dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 767b68e96993e29e3480d7ecdd9c4b84667c5762
refs/heads/master: f19e8aa11afa24036c6273428da51949b5acf30c
9 changes: 7 additions & 2 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 04724dd

Please sign in to comment.