Whamcloud - gitweb
LU-13822 ptlrpc: fixes for RCU-related stalls 14/39514/4
authorAndrew Perepechko <andrew.perepechko@hpe.com>
Mon, 27 Jul 2020 09:31:46 +0000 (12:31 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 19 Nov 2020 10:19:25 +0000 (10:19 +0000)
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.

Change-Id: I14b0aaf14ab127805699729adbb26459a2f4f07c
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
HPE-bug-id: LUS-8939
Reviewed-on: https://review.whamcloud.com/39514
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/client.c

index 368732a..4ec69b3 100644 (file)
@@ -2371,6 +2371,12 @@ 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();
+
        }
 }