Subject: From: Wu Fengguang Date: Sun Aug 01 13:04:58 CST 2010 Signed-off-by: Wu Fengguang --- mm/vmscan.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) --- linux-2.6.orig/mm/vmscan.c 2010-08-01 13:04:37.000000000 +0800 +++ linux-2.6/mm/vmscan.c 2010-08-01 13:04:46.000000000 +0800 @@ -391,8 +391,10 @@ static pageout_t pageout(struct page *pa * direct reclaiming a large contiguous area and the * first attempt to free a range of pages fails. */ - if (PageWriteback(page) && sync_writeback == PAGEOUT_IO_SYNC) + if (PageWriteback(page) && sync_writeback == PAGEOUT_IO_SYNC) { + printk("pageout stall: page %p\n", page); wait_on_page_writeback(page); + } if (!PageWriteback(page)) { /* synchronous write or broken a_ops? */ @@ -672,9 +674,10 @@ static unsigned long shrink_page_list(st * for any page for which writeback has already * started. */ - if (sync_writeback == PAGEOUT_IO_SYNC && may_enter_fs) + if (sync_writeback == PAGEOUT_IO_SYNC && may_enter_fs) { + printk("writeback stall: page %p\n", page); wait_on_page_writeback(page); - else + } else goto keep_locked; } @@ -1244,6 +1248,7 @@ static unsigned long shrink_inactive_lis /* Check if we should syncronously wait for writeback */ if (should_reclaim_stall(nr_taken, nr_freed, priority, sc)) { + printk("reclaim stall: priority %d\n", priority); congestion_wait(BLK_RW_ASYNC, HZ/10); /*