Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335793
b: refs/heads/master
c: 9671009
h: refs/heads/master
i:
  335791: 84589b2
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Nov 16, 2012
1 parent 56f6de4 commit a142deb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 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: 2ca3cb50edc351875df13d083524f524cdeb3054
refs/heads/master: 96710098ee124951ff2fed7cd8406da92aad011a
25 changes: 0 additions & 25 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,28 +1760,6 @@ static bool in_reclaim_compaction(struct scan_control *sc)
return false;
}

#ifdef CONFIG_COMPACTION
/*
* If compaction is deferred for sc->order then scale the number of pages
* reclaimed based on the number of consecutive allocation failures
*/
static unsigned long scale_for_compaction(unsigned long pages_for_compaction,
struct lruvec *lruvec, struct scan_control *sc)
{
struct zone *zone = lruvec_zone(lruvec);

if (zone->compact_order_failed <= sc->order)
pages_for_compaction <<= zone->compact_defer_shift;
return pages_for_compaction;
}
#else
static unsigned long scale_for_compaction(unsigned long pages_for_compaction,
struct lruvec *lruvec, struct scan_control *sc)
{
return pages_for_compaction;
}
#endif

/*
* Reclaim/compaction is used for high-order allocation requests. It reclaims
* order-0 pages before compacting the zone. should_continue_reclaim() returns
Expand Down Expand Up @@ -1829,9 +1807,6 @@ static inline bool should_continue_reclaim(struct lruvec *lruvec,
* inactive lists are large enough, continue reclaiming
*/
pages_for_compaction = (2UL << sc->order);

pages_for_compaction = scale_for_compaction(pages_for_compaction,
lruvec, sc);
inactive_lru_pages = get_lru_size(lruvec, LRU_INACTIVE_FILE);
if (nr_swap_pages > 0)
inactive_lru_pages += get_lru_size(lruvec, LRU_INACTIVE_ANON);
Expand Down

0 comments on commit a142deb

Please sign in to comment.