Commit 085b4897 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] vmscan: less throttling of page allocators and kswapd

This is just a random unsubstantiated tuning tweak: don't immediately
throttle page allocators and kwapd when the going is getting heavier: scan a
bit more of the LRU before throttling.
parent ffa0fb78
...@@ -870,7 +870,7 @@ int try_to_free_pages(struct zone **zones, ...@@ -870,7 +870,7 @@ int try_to_free_pages(struct zone **zones,
wakeup_bdflush(total_scanned); wakeup_bdflush(total_scanned);
/* Take a nap, wait for some writeback to complete */ /* Take a nap, wait for some writeback to complete */
if (total_scanned) if (total_scanned && priority < DEF_PRIORITY - 2)
blk_congestion_wait(WRITE, HZ/10); blk_congestion_wait(WRITE, HZ/10);
} }
if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY))
...@@ -993,7 +993,7 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages, struct page_state *ps) ...@@ -993,7 +993,7 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages, struct page_state *ps)
* OK, kswapd is getting into trouble. Take a nap, then take * OK, kswapd is getting into trouble. Take a nap, then take
* another pass across the zones. * another pass across the zones.
*/ */
if (pages_scanned) if (pages_scanned && priority < DEF_PRIORITY - 2)
blk_congestion_wait(WRITE, HZ/10); blk_congestion_wait(WRITE, HZ/10);
} }
out: out:
......
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