diff mbox series

[02/39] lustre: ptlrpc: fixes for RCU-related stalls

Message ID 1611249422-556-3-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: update to latest OpenSFS version as of Jan 21 2021 | expand

Commit Message

James Simmons Jan. 21, 2021, 5:16 p.m. UTC
From: Andrew Perepechko <andrew.perepechko@hpe.com>

ptlrpc_expired_set() may need to process a lot
of requests, so the processing loop needs to
schedule from time to time to avoid RCU-related
stalls.

HPE-bug-id: LUS-8939
WC-bug-id: https://jira.whamcloud.com/browse/LU-13822
Lustre-commit: 1bbd5b5f0ee042 ("LU-13822 ptlrpc: fixes for RCU-related stalls")
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-on: https://review.whamcloud.com/39514
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/ptlrpc/client.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/fs/lustre/ptlrpc/client.c b/fs/lustre/ptlrpc/client.c
index 0e01ab33..2002c03 100644
--- a/fs/lustre/ptlrpc/client.c
+++ b/fs/lustre/ptlrpc/client.c
@@ -2249,6 +2249,11 @@  void ptlrpc_expired_set(struct ptlrpc_request_set *set)
 		 * ptlrpcd thread.
 		 */
 		ptlrpc_expire_one_request(req, 1);
+		/*
+		 * Loops require that we resched once in a while to avoid
+		 * RCU stalls and a few other problems.
+		 */
+		cond_resched();
 	}
 }