mm: vmscan: remove remains of kswapd-managed zone->all_unreclaimable
authorJohannes Weiner <[email protected]>
Wed, 6 Aug 2014 23:06:10 +0000 (16:06 -0700)
committerLinus Torvalds <[email protected]>
Thu, 7 Aug 2014 01:01:18 +0000 (18:01 -0700)
shrink_zones() has a special branch to skip the all_unreclaimable()
check during hibernation, because a frozen kswapd can't mark a zone
unreclaimable.

But ever since commit 6e543d5780e3 ("mm: vmscan: fix
do_try_to_free_pages() livelock"), determining a zone to be
unreclaimable is done by directly looking at its scan history and no
longer relies on kswapd setting the per-zone flag.

Remove this branch and let shrink_zones() check the reclaimability of
the target zones regardless of hibernation state.

Signed-off-by: Johannes Weiner <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Cc: Rik van Riel <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Acked-by: Minchan Kim <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/vmscan.c

index 0f16ffe8eb67c6fcd0350add4a5a4b6092cb6905..19b5b8016209eddf1b228b6be546a52360affe6a 100644 (file)
@@ -2534,14 +2534,6 @@ out:
        if (sc->nr_reclaimed)
                return sc->nr_reclaimed;
 
-       /*
-        * As hibernation is going on, kswapd is freezed so that it can't mark
-        * the zone into all_unreclaimable. Thus bypassing all_unreclaimable
-        * check.
-        */
-       if (oom_killer_disabled)
-               return 0;
-
        /* Aborted reclaim to try compaction? don't OOM, then */
        if (aborted_reclaim)
                return 1;