From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20130507035849.285608737@goodmis.org> Date: Mon, 06 May 2013 23:58:02 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Suleiman Souhlal , Hugh Dickins Subject: [050/126] vfs: Revert spurious fix to spinning prevention in prune_icache_sb References: <20130507035712.909872333@goodmis.org> Content-Disposition: inline; filename=0050-vfs-Revert-spurious-fix-to-spinning-prevention-in-pr.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.6.11.3 stable review patch. If anyone has any objections, please let me know. ------------------ From: Suleiman Souhlal [ Upstream commit 5b55d708335a9e3e4f61f2dadf7511502205ccd1 ] Revert commit 62a3ddef6181 ("vfs: fix spinning prevention in prune_icache_sb"). This commit doesn't look right: since we are looking at the tail of the list (sb->s_inode_lru.prev) if we want to skip an inode, we should put it back at the head of the list instead of the tail, otherwise we will keep spinning on it. Discovered when investigating why prune_icache_sb came top in perf reports of a swapping load. Signed-off-by: Suleiman Souhlal Signed-off-by: Hugh Dickins Cc: stable@vger.kernel.org # v3.2+ Signed-off-by: Linus Torvalds Signed-off-by: Steven Rostedt --- fs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/inode.c b/fs/inode.c index 7c14897..d76b46f 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -725,7 +725,7 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan) * inode to the back of the list so we don't spin on it. */ if (!spin_trylock(&inode->i_lock)) { - list_move_tail(&inode->i_lru, &sb->s_inode_lru); + list_move(&inode->i_lru, &sb->s_inode_lru); continue; } -- 1.7.10.4