Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35602
b: refs/heads/master
c: 7887a3d
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Sep 26, 2006
1 parent 7fc74d2 commit 74ebd7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: 4ff1ffb4870b007b86f21e5f27eeb11498c4c077
refs/heads/master: 7887a3da753e1ba8244556cc9a2b38c815bfe256
11 changes: 8 additions & 3 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_RAWIO))
points /= 4;

/*
* If p's nodes don't overlap ours, it may still help to kill p
* because p may have allocated or otherwise mapped memory on
* this node before. However it will be less likely.
*/
if (!cpuset_excl_nodes_overlap(p))
points /= 8;

/*
* Adjust the score by oomkilladj.
*/
Expand Down Expand Up @@ -198,9 +206,6 @@ static struct task_struct *select_bad_process(unsigned long *ppoints)
continue;
if (p->oomkilladj == OOM_DISABLE)
continue;
/* If p's nodes don't overlap ours, it won't help to kill p. */
if (!cpuset_excl_nodes_overlap(p))
continue;

/*
* This is in the process of releasing memory so wait for it
Expand Down

0 comments on commit 74ebd7c

Please sign in to comment.