Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45301
b: refs/heads/master
c: 7ba3485
h: refs/heads/master
i:
  45299: cd2cd72
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Jan 6, 2007
1 parent 4339b15 commit 4eaf22f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: c8af57eb76fbd70c7f5b421b065fd55d096e2bff
refs/heads/master: 7ba3485947ee7bc89a17f86250fe9b692a615dff
12 changes: 6 additions & 6 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
return 0;
}

/*
* swapoff can easily use up all memory, so kill those first.
*/
if (p->flags & PF_SWAPOFF)
return ULONG_MAX;

/*
* The memory size of the process is the basis for the badness.
*/
Expand All @@ -76,6 +70,12 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
*/
task_unlock(p);

/*
* swapoff can easily use up all memory, so kill those first.
*/
if (p->flags & PF_SWAPOFF)
return ULONG_MAX;

/*
* Processes which fork a lot of child processes are likely
* a good choice. We add half the vmsize of the children if they
Expand Down

0 comments on commit 4eaf22f

Please sign in to comment.