Skip to contentSkip to conversation

fs: don't softlockup when evicting inodes

PATCH Superseded Josef Bacik 1 participant 1 message Dec 18, 2014 VFS

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: don't softlockup when evicting inodes

If I run an fs_mark job that creates millions of empty files and then immediately unmount the file system I will get a softlockup during unmount. This box has ~140gb of RAM so we never hit sufficient memory pressure to evict enough inodes during the runtime of the benchmark, which means I see around 80 million inodes being evicted at unmount time. With this patch my box no longer softlocks up. Thanks,

---
 fs/inode.c | 1 +
 1 file changed, 1 insertion(+)
fs/inode.c +1 -0
index ad60555..1a60ed1 100644
@@ -581,6 +581,7 @@ static void dispose_list(struct list_head *head)
 		list_del_init(&inode->i_lru);
 
 		evict(inode);
+		cond_resched();
 	}
 }
 
Signature · 1 line
1.9.3