Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207220
b: refs/heads/master
c: f442003
h: refs/heads/master
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Aug 10, 2010
1 parent 0364694 commit 6e0e2cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 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: ff321feac22313cf53ffceb69224b09ac19ff22b
refs/heads/master: f44200320b10c76003101dee21c5f961e80faf0b
18 changes: 8 additions & 10 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ static enum oom_constraint constrained_alloc(struct zonelist *zonelist,
* (not docbooked, we don't want this one cluttering up the manual)
*/
static struct task_struct *select_bad_process(unsigned long *ppoints,
struct mem_cgroup *mem, enum oom_constraint constraint,
const nodemask_t *mask)
struct mem_cgroup *mem, const nodemask_t *nodemask)
{
struct task_struct *p;
struct task_struct *chosen = NULL;
Expand All @@ -301,9 +300,7 @@ static struct task_struct *select_bad_process(unsigned long *ppoints,
continue;
if (mem && !task_in_mem_cgroup(p, mem))
continue;
if (!has_intersects_mems_allowed(p,
constraint == CONSTRAINT_MEMORY_POLICY ? mask :
NULL))
if (!has_intersects_mems_allowed(p, nodemask))
continue;

/*
Expand Down Expand Up @@ -518,7 +515,7 @@ void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask)
check_panic_on_oom(CONSTRAINT_MEMCG, gfp_mask, 0);
read_lock(&tasklist_lock);
retry:
p = select_bad_process(&points, mem, CONSTRAINT_MEMCG, NULL);
p = select_bad_process(&points, mem, NULL);
if (!p || PTR_ERR(p) == -1UL)
goto out;

Expand Down Expand Up @@ -635,8 +632,7 @@ static void clear_system_oom(void)
/*
* Must be called with tasklist_lock held for read.
*/
static void __out_of_memory(gfp_t gfp_mask, int order,
enum oom_constraint constraint, const nodemask_t *mask)
static void __out_of_memory(gfp_t gfp_mask, int order, const nodemask_t *mask)
{
struct task_struct *p;
unsigned long points;
Expand All @@ -650,7 +646,7 @@ static void __out_of_memory(gfp_t gfp_mask, int order,
* Rambo mode: Shoot down a process and hope it solves whatever
* issues we may have.
*/
p = select_bad_process(&points, NULL, constraint, mask);
p = select_bad_process(&points, NULL, mask);

if (PTR_ERR(p) == -1UL)
return;
Expand Down Expand Up @@ -708,7 +704,9 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask,
constraint = constrained_alloc(zonelist, gfp_mask, nodemask);
check_panic_on_oom(constraint, gfp_mask, order);
read_lock(&tasklist_lock);
__out_of_memory(gfp_mask, order, constraint, nodemask);
__out_of_memory(gfp_mask, order,
constraint == CONSTRAINT_MEMORY_POLICY ? nodemask :
NULL);
read_unlock(&tasklist_lock);

/*
Expand Down

0 comments on commit 6e0e2cd

Please sign in to comment.