Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284400
b: refs/heads/master
c: 7335084
h: refs/heads/master
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Jan 13, 2012
1 parent f1039c9 commit bc3c73a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 5013473152d1ac9d44d787fb02edda845fdf2cb3
refs/heads/master: 7335084d446b83cbcb15da80497d03f0c1dc9e21
8 changes: 7 additions & 1 deletion trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2263,6 +2263,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
struct zoneref *z;
struct zone *zone;
unsigned long writeback_threshold;
bool should_abort_reclaim;

get_mems_allowed();
delayacct_freepages_start();
Expand All @@ -2274,7 +2275,8 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
sc->nr_scanned = 0;
if (!priority)
disable_swap_token(sc->target_mem_cgroup);
if (shrink_zones(priority, zonelist, sc))
should_abort_reclaim = shrink_zones(priority, zonelist, sc);
if (should_abort_reclaim)
break;

/*
Expand Down Expand Up @@ -2342,6 +2344,10 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
if (oom_killer_disabled)
return 0;

/* Aborting reclaim to try compaction? don't OOM, then */
if (should_abort_reclaim)
return 1;

/* top priority shrink_zones still had more to do? don't OOM, then */
if (global_reclaim(sc) && !all_unreclaimable(zonelist, sc))
return 1;
Expand Down

0 comments on commit bc3c73a

Please sign in to comment.