From: Andrew Perepechko Date: Mon, 27 Jul 2020 09:31:46 +0000 (+0300) Subject: LU-13822 ptlrpc: fixes for RCU-related stalls X-Git-Tag: 2.13.57~73 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=1bbd5b5f0ee042cf89774eadff47211a5bef7ee0;p=fs%2Flustre-release.git LU-13822 ptlrpc: fixes for RCU-related stalls 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 HPE-bug-id: LUS-8939 Reviewed-on: https://review.whamcloud.com/39514 Reviewed-by: Alexander Zarochentsev Reviewed-by: Neil Brown Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 368732a..4ec69b3 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -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(); + } }