aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-11-30 12:12:33 -0500
committerOlof Johansson <olof@lixom.net>2012-11-30 12:12:33 -0500
commit5c1af2a7011bf719807de360cb64c2f610269a38 (patch)
treefc4e6657d30c6eb48367c40e50c6b7428f96aaea /mm/vmscan.c
parentef7848683f4de4903376638b69e6b4ac729b3ead (diff)
parent573e5bbe653d01dc0f27e2d97754db9246b501c8 (diff)
Merge branch 'next/pm-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/pm
From Kukjin Kim: * 'next/pm-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: EXYNOS: Add flush_cache_all in suspend finisher ARM: EXYNOS: Remove scu_enable from cpuidle ARM: EXYNOS: Fix soft reboot hang after suspend/resume ARM: EXYNOS: Add support for rtc wakeup ARM: EXYNOS: fix the hotplug for Cortex-A15 + Linux 3.7-rc6
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8b055e9379bc..48550c66f1f2 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1760,28 +1760,6 @@ static bool in_reclaim_compaction(struct scan_control *sc)
1760 return false; 1760 return false;
1761} 1761}
1762 1762
1763#ifdef CONFIG_COMPACTION
1764/*
1765 * If compaction is deferred for sc->order then scale the number of pages
1766 * reclaimed based on the number of consecutive allocation failures
1767 */
1768static unsigned long scale_for_compaction(unsigned long pages_for_compaction,
1769 struct lruvec *lruvec, struct scan_control *sc)
1770{
1771 struct zone *zone = lruvec_zone(lruvec);
1772
1773 if (zone->compact_order_failed <= sc->order)
1774 pages_for_compaction <<= zone->compact_defer_shift;
1775 return pages_for_compaction;
1776}
1777#else
1778static unsigned long scale_for_compaction(unsigned long pages_for_compaction,
1779 struct lruvec *lruvec, struct scan_control *sc)
1780{
1781 return pages_for_compaction;
1782}
1783#endif
1784
1785/* 1763/*
1786 * Reclaim/compaction is used for high-order allocation requests. It reclaims 1764 * Reclaim/compaction is used for high-order allocation requests. It reclaims
1787 * order-0 pages before compacting the zone. should_continue_reclaim() returns 1765 * order-0 pages before compacting the zone. should_continue_reclaim() returns
@@ -1829,9 +1807,6 @@ static inline bool should_continue_reclaim(struct lruvec *lruvec,
1829 * inactive lists are large enough, continue reclaiming 1807 * inactive lists are large enough, continue reclaiming
1830 */ 1808 */
1831 pages_for_compaction = (2UL << sc->order); 1809 pages_for_compaction = (2UL << sc->order);
1832
1833 pages_for_compaction = scale_for_compaction(pages_for_compaction,
1834 lruvec, sc);
1835 inactive_lru_pages = get_lru_size(lruvec, LRU_INACTIVE_FILE); 1810 inactive_lru_pages = get_lru_size(lruvec, LRU_INACTIVE_FILE);
1836 if (nr_swap_pages > 0) 1811 if (nr_swap_pages > 0)
1837 inactive_lru_pages += get_lru_size(lruvec, LRU_INACTIVE_ANON); 1812 inactive_lru_pages += get_lru_size(lruvec, LRU_INACTIVE_ANON);