[PATCH 17/47] writeback: do uninterruptible sleep in balance_dirty_pages()

From: Wu Fengguang
Date: Mon Dec 13 2010 - 01:59:49 EST


Comments from Andrew Morton:

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.

Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
---
mm/page-writeback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next.orig/mm/page-writeback.c 2010-12-08 22:44:26.000000000 +0800
+++ linux-next/mm/page-writeback.c 2010-12-08 22:44:27.000000000 +0800
@@ -673,7 +673,7 @@ pause:
pages_dirtied,
pause);
bdi_update_write_bandwidth(bdi, &bw_time, &bw_written);
- __set_current_state(TASK_INTERRUPTIBLE);
+ __set_current_state(TASK_UNINTERRUPTIBLE);
io_schedule_timeout(pause);
bdi_update_write_bandwidth(bdi, &bw_time, &bw_written);



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/