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


Groups > linux.kernel > #1317340 > unrolled thread

[PATCH 2/6] f2fs: give scheduling point in shrinking path

Started byJaegeuk Kim <jaegeuk@kernel.org>
First post2016-01-25 23:10 +0100
Last post2016-01-25 23:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/6] f2fs: give scheduling point in shrinking path Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-25 23:10 +0100

#1317340 — [PATCH 2/6] f2fs: give scheduling point in shrinking path

FromJaegeuk Kim <jaegeuk@kernel.org>
Date2016-01-25 23:10 +0100
Subject[PATCH 2/6] f2fs: give scheduling point in shrinking path
Message-ID<qUXuI-25U-35@gated-at.bofh.it>
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 18311ff..af53503 100644
--- a/fs/f2fs/extent_cache.c
+++ b/fs/f2fs/extent_cache.c
@@ -593,6 +593,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);
 
@@ -622,6 +624,7 @@ free_node:
 		__detach_extent_node(sbi, en->et, en);
 		write_unlock(&en->et->lock);
 		kmem_cache_free(extent_node_slab, en);
+		cond_resched();
 	}
 
 unlock_out:
-- 
2.6.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web