Even if zone congested it might be better to continue reclaim as we may allocate memory from another zone. So call in wait_iff_congested() only if we have troubles in reclaiming memory.
https://jira.sw.ru/browse/PSBM-61409 Signed-off-by: Andrey Ryabinin <[email protected]> --- mm/vmscan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index d71fa15a1750..4922f734cdb4 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2481,7 +2481,8 @@ static void shrink_zone(struct zone *zone, struct scan_control *sc, * is congested. Allow kswapd to continue until it starts encountering * unqueued dirty pages or cycling through the LRU too quickly. */ - if (!sc->hibernation_mode && !current_is_kswapd()) + if (sc->priority < (DEF_PRIORITY - 2) && !sc->hibernation_mode && + !current_is_kswapd()) wait_iff_congested(zone, BLK_RW_ASYNC, HZ/10); if (reclaim_state) { -- 2.13.6 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
