Commit cfe7c13e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Add a scheduling point to page reclaim

When the VM is under heavy load and a page allocator caller is holding
the BKL there can be several-millisecond scheduling stalls.

So add a cond_resched() at every 32nd page (approx).
parent 097137c5
......@@ -209,6 +209,8 @@ shrink_list(struct list_head *page_list, unsigned int gfp_mask,
int pgactivate = 0;
int ret = 0;
cond_resched();
pagevec_init(&freed_pvec, 1);
while (!list_empty(page_list)) {
struct page *page;
......
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