Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vfs: Revert spurious fix to spinning prevention in prune_icache_sb

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 <suleiman@google.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: stable@vger.kernel.org # v3.2+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Suleiman Souhlal and committed by
Linus Torvalds
5b55d708 a49b7e82

+1 -1
+1 -1
fs/inode.c
··· 725 725 * inode to the back of the list so we don't spin on it. 726 726 */ 727 727 if (!spin_trylock(&inode->i_lock)) { 728 - list_move_tail(&inode->i_lru, &sb->s_inode_lru); 728 + list_move(&inode->i_lru, &sb->s_inode_lru); 729 729 continue; 730 730 } 731 731