Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254740
b: refs/heads/master
c: d7868da
h: refs/heads/master
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Jul 9, 2011
1 parent d800323 commit 0b412bf
Show file tree
Hide file tree
Showing 2 changed files with 14 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: 08951e545918c1594434d000d88a7793e2452a9b
refs/heads/master: d7868dae893c83c50c7824bc2bc75f93d114669f
23 changes: 13 additions & 10 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2510,18 +2510,18 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
KSWAPD_ZONE_BALANCE_GAP_RATIO);
if (!zone_watermark_ok_safe(zone, order,
high_wmark_pages(zone) + balance_gap,
end_zone, 0))
end_zone, 0)) {
shrink_zone(priority, zone, &sc);
reclaim_state->reclaimed_slab = 0;
nr_slab = shrink_slab(&shrink, sc.nr_scanned, lru_pages);
sc.nr_reclaimed += reclaim_state->reclaimed_slab;
total_scanned += sc.nr_scanned;

if (zone->all_unreclaimable)
continue;
if (nr_slab == 0 &&
!zone_reclaimable(zone))
zone->all_unreclaimable = 1;
reclaim_state->reclaimed_slab = 0;
nr_slab = shrink_slab(&shrink, sc.nr_scanned, lru_pages);
sc.nr_reclaimed += reclaim_state->reclaimed_slab;
total_scanned += sc.nr_scanned;

if (nr_slab == 0 && !zone_reclaimable(zone))
zone->all_unreclaimable = 1;
}

/*
* If we've done a decent amount of scanning and
* the reclaim ratio is low, start doing writepage
Expand All @@ -2531,6 +2531,9 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
total_scanned > sc.nr_reclaimed + sc.nr_reclaimed / 2)
sc.may_writepage = 1;

if (zone->all_unreclaimable)
continue;

if (!zone_watermark_ok_safe(zone, order,
high_wmark_pages(zone), end_zone, 0)) {
all_zones_ok = 0;
Expand Down

0 comments on commit 0b412bf

Please sign in to comment.