Commit 8d074293 authored by Johannes Weiner's avatar Johannes Weiner Committed by Linus Torvalds

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

But ever since commit 6e543d57 ("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: default avatarJohannes Weiner <>
Acked-by: default avatarMel Gorman <>
Cc: Rik van Riel <>
Acked-by: default avatarMichal Hocko <>
Cc: Vlastimil Babka <>
Acked-by: default avatarMinchan Kim <>
Cc: KOSAKI Motohiro <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 1a4dc5bc
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment