linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations
@ 2024-08-21 18:05 trondmy
  2024-08-21 18:05 ` [PATCH 2/3] NFSv4: Fix clearing of layout segments in layoutreturn trondmy
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: trondmy @ 2024-08-21 18:05 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: linux-nfs

From: Trond Myklebust <trond.myklebust@hammerspace.com>

We're seeing reports of soft lockups when iterating through the loops,
so let's add rescheduling points.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfs/super.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index cbbd4866b0b7..97b386032b71 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -47,6 +47,7 @@
 #include <linux/vfs.h>
 #include <linux/inet.h>
 #include <linux/in6.h>
+#include <linux/sched.h>
 #include <linux/slab.h>
 #include <net/ipv6.h>
 #include <linux/netdevice.h>
@@ -228,6 +229,7 @@ static int __nfs_list_for_each_server(struct list_head *head,
 		ret = fn(server, data);
 		if (ret)
 			goto out;
+		cond_resched();
 		rcu_read_lock();
 	}
 	rcu_read_unlock();
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-22 12:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-21 18:05 [PATCH 1/3] NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations trondmy
2024-08-21 18:05 ` [PATCH 2/3] NFSv4: Fix clearing of layout segments in layoutreturn trondmy
2024-08-22 12:07   ` Jeff Layton
2024-08-21 18:05 ` [PATCH 3/3] NFS: Avoid unnecessary rescanning of the per-server delegation list trondmy
2024-08-22 12:19   ` Jeff Layton
2024-08-22 11:58 ` [PATCH 1/3] NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations Jeff Layton

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