Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217438
b: refs/heads/master
c: e18641e
h: refs/heads/master
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Oct 26, 2010
1 parent 851dc22 commit 6631c4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 3d5992d2ac7dc09aed8ab537cba074589f0f0a52
refs/heads/master: e18641e19a9204f241f04a5ac700168dcd18de4f
9 changes: 5 additions & 4 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,11 @@ unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem,
return 0;

/*
* Shortcut check for OOM_SCORE_ADJ_MIN so the entire heuristic doesn't
* need to be executed for something that cannot be killed.
* Shortcut check for a thread sharing p->mm that is OOM_SCORE_ADJ_MIN
* so the entire heuristic doesn't need to be executed for something
* that cannot be killed.
*/
if (p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) {
if (atomic_read(&p->mm->oom_disable_count)) {
task_unlock(p);
return 0;
}
Expand Down Expand Up @@ -680,7 +681,7 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask,
read_lock(&tasklist_lock);
if (sysctl_oom_kill_allocating_task &&
!oom_unkillable_task(current, NULL, nodemask) &&
(current->signal->oom_adj != OOM_DISABLE)) {
current->mm && !atomic_read(&current->mm->oom_disable_count)) {
/*
* oom_kill_process() needs tasklist_lock held. If it returns
* non-zero, current could not be killed so we must fallback to
Expand Down

0 comments on commit 6631c4d

Please sign in to comment.