Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54227
b: refs/heads/master
c: 2b45ab3
h: refs/heads/master
i:
  54225: c279a69
  54223: e1334e0
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed May 7, 2007
1 parent 857904b commit 234a48a
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 2b744c01a54fe0c9974ff1b29522f25f07084053
refs/heads/master: 2b45ab3398a0ba119b1f672c7c56fd5a431b7f0a
10 changes: 6 additions & 4 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
struct task_struct *p;
unsigned long points = 0;
unsigned long freed = 0;
int constraint;

blocking_notifier_call_chain(&oom_notify_list, 0, &freed);
if (freed > 0)
Expand All @@ -416,14 +417,15 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
if (sysctl_panic_on_oom == 2)
panic("out of memory. Compulsory panic_on_oom is selected.\n");

cpuset_lock();
read_lock(&tasklist_lock);

/*
* Check if there were limitations on the allocation (only relevant for
* NUMA) that may require different handling.
*/
switch (constrained_alloc(zonelist, gfp_mask)) {
constraint = constrained_alloc(zonelist, gfp_mask);
cpuset_lock();
read_lock(&tasklist_lock);

switch (constraint) {
case CONSTRAINT_MEMORY_POLICY:
oom_kill_process(current, points,
"No available memory (MPOL_BIND)");
Expand Down

0 comments on commit 234a48a

Please sign in to comment.