From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josef Bacik Subject: [PATCH] fs: don't softlockup when evicting inodes Date: Thu, 18 Dec 2014 11:40:32 -0500 Message-ID: <1418920832-1574-1-git-send-email-jbacik@fb.com> Mime-Version: 1.0 Content-Type: text/plain To: , Return-path: Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:23150 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751033AbaLRQki (ORCPT ); Thu, 18 Dec 2014 11:40:38 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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, Signed-off-by: Josef Bacik --- fs/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/inode.c b/fs/inode.c index ad60555..1a60ed1 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -581,6 +581,7 @@ static void dispose_list(struct list_head *head) list_del_init(&inode->i_lru); evict(inode); + cond_resched(); } } -- 1.9.3