linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] f2fs: give scheduling point in shrinking path
@ 2016-01-23 20:16 Jaegeuk Kim
  2016-01-23 20:16 ` [PATCH 2/4] f2fs: remove needless condition check Jaegeuk Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2016-01-23 20:16 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim

It needs to give a chance to be rescheduled while shrinking slab entries.

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

diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
index ccd5c63..325825b 100644
--- a/fs/f2fs/extent_cache.c
+++ b/fs/f2fs/extent_cache.c
@@ -585,6 +585,8 @@ unsigned int f2fs_shrink_extent_tree(struct f2fs_sb_info *sbi, int nr_shrink)
 
 		if (node_cnt + tree_cnt >= nr_shrink)
 			goto unlock_out;
+
+		cond_resched();
 	}
 	up_write(&sbi->extent_tree_lock);
 
@@ -631,6 +633,7 @@ free_node:
 			if (node_cnt + tree_cnt >= nr_shrink)
 				goto unlock_out;
 		}
+		cond_resched();
 	}
 unlock_out:
 	up_write(&sbi->extent_tree_lock);
-- 
2.6.3

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

end of thread, other threads:[~2016-01-23 20:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-23 20:16 [PATCH 1/4] f2fs: give scheduling point in shrinking path Jaegeuk Kim
2016-01-23 20:16 ` [PATCH 2/4] f2fs: remove needless condition check Jaegeuk Kim
2016-01-23 20:16 ` [PATCH 3/4] f2fs: use wait_for_stable_page to avoid contention Jaegeuk Kim
2016-01-23 20:16 ` [PATCH 4/4] f2fs: use writepages->lock for WB_SYNC_ALL Jaegeuk Kim

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).