mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [merged] ocfs2-fix-potential-soft-lockup-during-fstrim.patch removed from -mm tree
@ 2020-10-14 20:56 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-10-14 20:56 UTC (permalink / raw)
  To: gechangwei, ghe, jlbec, joseph.qi, junxiao.bi, mark, mm-commits, piaojun


The patch titled
     Subject: ocfs2: fix potential soft lockup during fstrim
has been removed from the -mm tree.  Its filename was
     ocfs2-fix-potential-soft-lockup-during-fstrim.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Gang He <ghe@suse.com>
Subject: ocfs2: fix potential soft lockup during fstrim

When we discard unused blocks on a mounted ocfs2 filesystem, fstrim
handles each block goup with locking/unlocking global bitmap meta-file
repeatedly. we should let fstrim thread take a break(if need) between
unlock and lock, this will avoid the potential soft lockup problem,
and also gives the upper applications more IO opportunities, these
applications are not blocked for too long at writing files.

Link: https://lkml.kernel.org/r/20200927015815.14904-1-ghe@suse.com
Signed-off-by: Gang He <ghe@suse.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/ocfs2/alloc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/fs/ocfs2/alloc.c~ocfs2-fix-potential-soft-lockup-during-fstrim
+++ a/fs/ocfs2/alloc.c
@@ -7654,8 +7654,10 @@ out_mutex:
 	 * main_bm related locks for avoiding the current IO starve, then go to
 	 * trim the next group
 	 */
-	if (ret >= 0 && group <= last_group)
+	if (ret >= 0 && group <= last_group) {
+		cond_resched();
 		goto next_group;
+	}
 out:
 	range->len = trimmed * sb->s_blocksize;
 	return ret;
_

Patches currently in -mm which might be from ghe@suse.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-14 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 20:56 [merged] ocfs2-fix-potential-soft-lockup-during-fstrim.patch removed from -mm tree akpm

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).