提交 5b55d708 编写于 作者: S Suleiman Souhlal 提交者: Linus Torvalds

vfs: Revert spurious fix to spinning prevention in prune_icache_sb

Revert commit 62a3ddef ("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: NSuleiman Souhlal <suleiman@google.com>
Signed-off-by: NHugh Dickins <hughd@google.com>
Cc: stable@vger.kernel.org # v3.2+
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a49b7e82
...@@ -725,7 +725,7 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan) ...@@ -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. * inode to the back of the list so we don't spin on it.
*/ */
if (!spin_trylock(&inode->i_lock)) { 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; continue;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册