Linus,
refill_freelist() (fs/buffer.c) calls page_launder(GFP_BUFFER) after
syncing some of the oldest dirty buffers.
As fair as I can see, that used to make sense because clean pages could be
freed with page_launder(GFP_BUFFER) -- this could avoid a potential sleep
on kswapd when trying to allocate a buffer page with grow_buffers().
But now __alloc_pages will not wait kswapd anymore.
Instead the running thread will free clean pages only when it has to call
page_launder() itself because kswapd could not keep up.
Could you remove the call to page_launder() and the if() on top on your
tree ?
Come one, doing by hand its easier than a patch.
Here's the function:
/*
* We used to try various strange things. Let's not.
* We'll just try to balance dirty buffers, and possibly
* launder some pages.
*/
static void refill_freelist(int size)
{
balance_dirty(NODEV);
if (free_shortage())
page_launder(GFP_BUFFER, 0);
grow_buffers(size);
}
grow_buffers() calls alloc_page(GFP_BUFFER).