From: Josef Bacik <jbacik@fb.com>
To: <viro@ZenIV.linux.org.uk>, <linux-fsdevel@vger.kernel.org>
Subject: [PATCH] fs: don't softlockup when evicting inodes
Date: Thu, 18 Dec 2014 11:40:32 -0500 [thread overview]
Message-ID: <1418920832-1574-1-git-send-email-jbacik@fb.com> (raw)
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 <jbacik@fb.com>
---
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
reply other threads:[~2014-12-18 16:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1418920832-1574-1-git-send-email-jbacik@fb.com \
--to=jbacik@fb.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).