[PATCH] Move cond_resched() after iput() in sync_sb_inodes()

From: OGAWA Hirofumi
Date: Thu Mar 09 2006 - 11:19:53 EST


Hi,

In here, I think the following order is more cache-friendly. What do
you think?

Signed-off-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
---

fs/fs-writeback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/fs-writeback.c~iput-before-cond_resched fs/fs-writeback.c
--- linux-2.6/fs/fs-writeback.c~iput-before-cond_resched 2006-03-05 21:51:12.000000000 +0900
+++ linux-2.6-hirofumi/fs/fs-writeback.c 2006-03-05 21:51:12.000000000 +0900
@@ -382,8 +382,8 @@ sync_sb_inodes(struct super_block *sb, s
list_move(&inode->i_list, &sb->s_dirty);
}
spin_unlock(&inode_lock);
- cond_resched();
iput(inode);
+ cond_resched();
spin_lock(&inode_lock);
if (wbc->nr_to_write <= 0)
break;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/