From: Wu Fengguang Date: Wed, 22 Dec 2010 01:24:21 +0000 (-0800) Subject: writeback: do uninterruptible sleep in balance_dirty_pages() X-Git-Tag: v2.6.37-rc8~37 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d153ba64450b9371158c6516d6cac120faace44c;p=karo-tx-linux.git writeback: do uninterruptible sleep in balance_dirty_pages() Using TASK_INTERRUPTIBLE in balance_dirty_pages() seems wrong. If it's going to do that then it must break out if signal_pending(), otherwise it's pretty much guaranteed to degenerate into a busywait loop. Plus we *do* want these processes to appear in D state and to contribute to load average. So it should be TASK_UNINTERRUPTIBLE. -- Andrew Morton Signed-off-by: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page-writeback.c b/mm/page-writeback.c index b840afa89761..b4edfe7ce06c 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -563,7 +563,7 @@ static void balance_dirty_pages(struct address_space *mapping, break; /* We've done our duty */ } trace_wbc_balance_dirty_wait(&wbc, bdi); - __set_current_state(TASK_INTERRUPTIBLE); + __set_current_state(TASK_UNINTERRUPTIBLE); io_schedule_timeout(pause); /*