Whamcloud - gitweb
LU-18113: ptlrpc: move DEBUG_REQ out of spinlock 48/55948/2
authorAndriy Skulysh <andriy.skulysh@hpe.com>
Tue, 18 Jun 2024 18:18:59 +0000 (21:18 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 16 Aug 2024 23:55:23 +0000 (23:55 +0000)
It may help with slow cancel processing:

Stack :
crash_nmi_callback
nmi_handle
default_do_nmi
do_nmi
end_repeat_nmi
number
vsnprintf
libcfs_debug_msg
_debug_req
ptlrpc_server_request_add
ptlrpc_server_handle_req_in
ptlrpc_main
kthread
ret_from_fork
Progs:  1836895 "ldlm_cn00_011"

Change-Id: I778547c676be8192da2ec30ec5deefb789fe8e7b
HPE-bug-id: LUS-12411
Signed-off-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55948
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ptlrpc/service.c

index 8805451..c289844 100644 (file)
@@ -1683,8 +1683,6 @@ ptlrpc_server_check_resend_in_progress(struct ptlrpc_request *req)
        return NULL;
 
 found:
-       DEBUG_REQ(D_HA, req, "Found duplicate req in processing");
-       DEBUG_REQ(D_HA, tmp, "Request being processed");
        return tmp;
 }
 
@@ -1860,6 +1858,10 @@ static int ptlrpc_server_request_add(struct ptlrpc_service_part *svcpt,
 
                        spin_unlock_bh(&exp->exp_rpc_lock);
 
+                       DEBUG_REQ(D_HA, req,
+                                 "Found duplicate req in processing");
+                       DEBUG_REQ(D_HA, orig, "Request being processed");
+
                        /*
                         * When the client resend request and the server has
                         * the previous copy of it, we need to update deadlines,