Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207269
b: refs/heads/master
c: 1574804
h: refs/heads/master
i:
  207267: 8d9ae0f
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Aug 10, 2010
1 parent e872b7c commit 5cada8e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 7ee92255470daa0edb93866aec6e27534cd9a177
refs/heads/master: 15748048991e801a2d18ce5da4e0d528852bc106
15 changes: 8 additions & 7 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2600,7 +2600,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
.swappiness = vm_swappiness,
.order = order,
};
unsigned long slab_reclaimable;
unsigned long nr_slab_pages0, nr_slab_pages1;

cond_resched();
/*
Expand All @@ -2625,8 +2625,8 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
} while (priority >= 0 && sc.nr_reclaimed < nr_pages);
}

slab_reclaimable = zone_page_state(zone, NR_SLAB_RECLAIMABLE);
if (slab_reclaimable > zone->min_slab_pages) {
nr_slab_pages0 = zone_page_state(zone, NR_SLAB_RECLAIMABLE);
if (nr_slab_pages0 > zone->min_slab_pages) {
/*
* shrink_slab() does not currently allow us to determine how
* many pages were freed in this zone. So we take the current
Expand All @@ -2638,16 +2638,17 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
* take a long time.
*/
while (shrink_slab(sc.nr_scanned, gfp_mask, order) &&
zone_page_state(zone, NR_SLAB_RECLAIMABLE) >
slab_reclaimable - nr_pages)
(zone_page_state(zone, NR_SLAB_RECLAIMABLE) + nr_pages >
nr_slab_pages0))
;

/*
* Update nr_reclaimed by the number of slab pages we
* reclaimed from this zone.
*/
sc.nr_reclaimed += slab_reclaimable -
zone_page_state(zone, NR_SLAB_RECLAIMABLE);
nr_slab_pages1 = zone_page_state(zone, NR_SLAB_RECLAIMABLE);
if (nr_slab_pages1 < nr_slab_pages0)
sc.nr_reclaimed += nr_slab_pages0 - nr_slab_pages1;
}

p->reclaim_state = NULL;
Expand Down

0 comments on commit 5cada8e

Please sign in to comment.