Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1687745

[PATCH] f2fs: avoid cpu lockup

From Jaegeuk Kim <jaegeuk@kernel.org>
Newsgroups linux.kernel
Subject [PATCH] f2fs: avoid cpu lockup
Date 2017-07-15 03:30 +0200
Message-ID <u3k4a-3a5-19@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Before retrying to flush data or dentry pages, we need to release cpu in order
to prevent watchdog.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/checkpoint.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 56bbf592e487..c96913c56f6c 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -909,8 +909,11 @@ int sync_dirty_inodes(struct f2fs_sb_info *sbi, enum inode_type type)
 		 * wribacking dentry pages in the freeing inode.
 		 */
 		f2fs_submit_merged_write(sbi, DATA);
-		cond_resched();
 	}
+	/* We need to give a chance to get cpu for user file writers. */
+	if (!is_dir)
+		congestion_wait(BLK_RW_ASYNC, HZ/50);
+	cond_resched();
 	goto retry;
 }
 
-- 
2.13.0.rc1.294.g07d810a77f-goog

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] f2fs: avoid cpu lockup Jaegeuk Kim <jaegeuk@kernel.org> - 2017-07-15 03:30 +0200
  Re: [PATCH v2] f2fs: avoid cpu lockup Jaegeuk Kim <jaegeuk@kernel.org> - 2017-07-16 03:10 +0200
    Re: [f2fs-dev] [PATCH v2] f2fs: avoid cpu lockup Chao Yu <chao@kernel.org> - 2017-07-17 16:40 +0200
      Re: [f2fs-dev] [PATCH v2] f2fs: avoid cpu lockup Jaegeuk Kim <jaegeuk@kernel.org> - 2017-07-18 00:40 +0200
        Re: [f2fs-dev] [PATCH v2] f2fs: avoid cpu lockup Chao Yu <yuchao0@huawei.com> - 2017-07-18 03:50 +0200

csiph-web