From a0783f7f15f283794643bb8d5a775cf4628cd9b9 Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Thu, 26 Jun 2014 10:42:41 +1000 Subject: [PATCH] mm: vmscan: remove remains of kswapd-managed zone->all_unreclaimable 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 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 Acked-by: Mel Gorman Cc: Rik van Riel Acked-by: Michal Hocko Cc: Vlastimil Babka Acked-by: Minchan Kim Cc: KOSAKI Motohiro Signed-off-by: Andrew Morton --- mm/vmscan.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 521f7eab1798..029c41ed884d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2540,14 +2540,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; -- 2.39.5