linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: avoid hungtask problem caused by losing wake_up
@ 2016-02-23  4:07 Yunlei He
  2016-02-23  5:44 ` Chao Yu
  0 siblings, 1 reply; 16+ messages in thread
From: Yunlei He @ 2016-02-23  4:07 UTC (permalink / raw)
  To: chao2.yu, jaegeuk, linux-f2fs-devel; +Cc: Biao He

The D state of wait_on_all_pages_writeback should be waken by
function f2fs_write_end_io when all writeback pages have been
succesfully written to device. It's possible that wake_up comes
between get_pages and io_schedule. Maybe in this case it will
lost wake_up and still in D state even if all pages have been
write back to device, and finally, the whole system will be into
the hungtask state.

                if (!get_pages(sbi, F2FS_WRITEBACK))
                         break;
					<---------  wake_up
                io_schedule();

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Signed-off-by: Biao He <hebiao6@huawei.com>
---
 fs/f2fs/checkpoint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 2bac8a1..f55355d 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -920,7 +920,7 @@ static void wait_on_all_pages_writeback(struct f2fs_sb_info *sbi)
 		if (!get_pages(sbi, F2FS_WRITEBACK))
 			break;
 
-		io_schedule();
+		io_schedule_timeout(5*HZ);
 	}
 	finish_wait(&sbi->cp_wait, &wait);
 }
-- 
1.9.1


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-02-26  1:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-23  4:07 [PATCH] f2fs: avoid hungtask problem caused by losing wake_up Yunlei He
2016-02-23  5:44 ` Chao Yu
2016-02-23  7:02   ` He YunLei
2016-02-23  9:15     ` Chao Yu
2016-02-23 11:36       ` He YunLei
2016-02-24  3:46         ` Chao Yu
2016-02-24  7:32           ` He YunLei
2016-02-24  8:05             ` Chao Yu
2016-02-24  9:45               ` hebiao (G)
2016-02-25  9:32                 ` Chao Yu
2016-02-25  7:36           ` He YunLei
2016-02-25  9:41             ` Chao Yu
2016-02-25 19:03               ` Jaegeuk Kim
2016-02-26  1:15                 ` Chao Yu
2016-02-23  9:32     ` Shawn Lin
2016-02-23 11:45       ` He YunLei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).