]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
SUNRPC: Capture completion of all RPC tasks
authorChuck Lever <chuck.lever@oracle.com>
Wed, 20 Nov 2019 21:25:52 +0000 (16:25 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:47:23 +0000 (14:47 +0100)
commit1d8a0e134bcfe2a07f76f1bc583ce3d09258f160
treef8fc24720036b8a27a90e9025e50109a022bfc51
parent2026968638f83b3aab03e1963787044c39d008fc
SUNRPC: Capture completion of all RPC tasks

BugLink: https://bugs.launchpad.net/bugs/1900624
[ Upstream commit a264abad51d8ecb7954a2f6d9f1885b38daffc74 ]

RPC tasks on the backchannel never invoke xprt_complete_rqst(), so
there is no way to report their tk_status at completion. Also, any
RPC task that exits via rpc_exit_task() before it is replied to will
also disappear without a trace.

Introduce a trace point that is symmetrical with rpc_task_begin that
captures the termination status of each RPC task.

Sample trace output for callback requests initiated on the server:
   kworker/u8:12-448   [003]   127.025240: rpc_task_end:         task:50@3 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpc_exit_task
   kworker/u8:12-448   [002]   127.567310: rpc_task_end:         task:51@3 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpc_exit_task
   kworker/u8:12-448   [001]   130.506817: rpc_task_end:         task:52@3 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpc_exit_task

Odd, though, that I never see trace_rpc_task_complete, either in the
forward or backchannel. Should it be removed?

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
include/trace/events/sunrpc.h
net/sunrpc/sched.c