Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252035
b: refs/heads/master
c: d149e3b
h: refs/heads/master
i:
  252033: 40cb56e
  252031: 375fe41
v: v3
  • Loading branch information
Ying Han authored and Linus Torvalds committed May 27, 2011
1 parent fc482a8 commit c55bf61
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: 0ae5e89c60c9eb87da36a2614836bc434b0ec2ad
refs/heads/master: d149e3b25d7c5f33de9aa866303926fa53535aa7
16 changes: 14 additions & 2 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1977,11 +1977,14 @@ static void shrink_zone(int priority, struct zone *zone,
* If a zone is deemed to be full of pinned pages then just give it a light
* scan then give up on it.
*/
static void shrink_zones(int priority, struct zonelist *zonelist,
static unsigned long shrink_zones(int priority, struct zonelist *zonelist,
struct scan_control *sc)
{
struct zoneref *z;
struct zone *zone;
unsigned long nr_soft_reclaimed;
unsigned long nr_soft_scanned;
unsigned long total_scanned = 0;

for_each_zone_zonelist_nodemask(zone, z, zonelist,
gfp_zone(sc->gfp_mask), sc->nodemask) {
Expand All @@ -1998,8 +2001,17 @@ static void shrink_zones(int priority, struct zonelist *zonelist,
continue; /* Let kswapd poll it */
}

nr_soft_scanned = 0;
nr_soft_reclaimed = mem_cgroup_soft_limit_reclaim(zone,
sc->order, sc->gfp_mask,
&nr_soft_scanned);
sc->nr_reclaimed += nr_soft_reclaimed;
total_scanned += nr_soft_scanned;

shrink_zone(priority, zone, sc);
}

return total_scanned;
}

static bool zone_reclaimable(struct zone *zone)
Expand Down Expand Up @@ -2064,7 +2076,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
sc->nr_scanned = 0;
if (!priority)
disable_swap_token();
shrink_zones(priority, zonelist, sc);
total_scanned += shrink_zones(priority, zonelist, sc);
/*
* Don't shrink slabs when reclaiming memory from
* over limit cgroups
Expand Down

0 comments on commit c55bf61

Please sign in to comment.