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

James Simmons jsimmons at infradead.org
Thu Jan 21 09:16:25 PST 2021

From: Andrew Perepechko <andrew.perepechko at 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

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 at hpe.com>
Reviewed-on: https://review.whamcloud.com/39514
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev at hpe.com>
Reviewed-by: Neil Brown <neilb at suse.de>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
 fs/lustre/ptlrpc/client.c | 5 +++++
 1 file changed, 5 insertions(+)

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();

More information about the lustre-devel mailing list