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

vfs: use RCU in ilookup

A soft lockup in ilookup was reported when stress-testing a 512-way
system [1] (see [2] for full context) and it was verified that not
taking the lock shifts issues back to mm.

[1] https://lore.kernel.org/linux-mm/56865e57-c250-44da-9713-cf1404595bcc@amd.com/
[2] https://lore.kernel.org/linux-mm/d2841226-e27b-4d3d-a578-63587a3aa4f3@amd.com/

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://lore.kernel.org/r/20240715071324.265879-1-mjguzik@gmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Mateusz Guzik and committed by
Christian Brauner
122381a4 641bb439

+1 -3
+1 -3
fs/inode.c
··· 1570 1570 struct hlist_head *head = inode_hashtable + hash(sb, ino); 1571 1571 struct inode *inode; 1572 1572 again: 1573 - spin_lock(&inode_hash_lock); 1574 - inode = find_inode_fast(sb, head, ino, true); 1575 - spin_unlock(&inode_hash_lock); 1573 + inode = find_inode_fast(sb, head, ino, false); 1576 1574 1577 1575 if (inode) { 1578 1576 if (IS_ERR(inode))