Commit 00401a44 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fix kswapd throttling

kswapd currently takes a throttling nap even if it freed all the pages it
was asked to free.

Change it so we only throttle if reclaim is not being sufficiently
successful.
parent ed8ff7a4
......@@ -930,7 +930,8 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages, struct page_state *ps)
}
if (all_zones_ok)
break;
blk_congestion_wait(WRITE, HZ/10);
if (to_free > 0)
blk_congestion_wait(WRITE, HZ/10);
}
return nr_pages - to_free;
}
......
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