Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp852322pxk; Thu, 17 Sep 2020 19:05:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxqhLPibnkK7kNoxacHV5wC6E5vYDm3pJemfChHHgjNwXyCXcvu7XNrInb9xPhervxJNZf X-Received: by 2002:aa7:d29a:: with SMTP id w26mr35587446edq.106.1600394758089; Thu, 17 Sep 2020 19:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600394758; cv=none; d=google.com; s=arc-20160816; b=WxKDE24tXnvAxZOfnLcZX5TsGaXV45UBprcmczHt5sas6Y3CAjaf7Z5jrJDIBineyM cU1gX8XulqrhlVE/2vdbDSeOwbQxDi1FSs1cNNhO1qjajakCEou5a02kbcOtzkq/Rxra jTMN75y07w5DgPvTJYV0KTd6E05ttL4oEjid8598rIL/cuofjG3SarPfk4RbaHk98XAN Bn6kO6+3j8kG1A5gR4/Z9XjhC3F/KLXxrxBNA+SnyA4fRjjxfZ/otu7Ne4sARgSGVoQp v9kr/WHbxNEs/9RM1VPjmodTU/9twxD2TAFAZR918pPuyf9OqwG5VJ5SC7b7JRdJaSjP G/1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GfGDASfCiE0qZqgvTedkbWN+Yi2t6yibexpupzCfYXc=; b=kZiq8sliqB8GFtyFJIn7AWBXh6rL/N0WyOtAMU+gTjOS+tOBqak4NQBKbW/TWy+w48 nUUIBotNFC0Ap8vaZ6QTha1vYWeZyfObXGeACmwTCESihX7meRzn2lxX3MuXunFg7JfZ HQXVwA1eaJTaXbKkuvmfr9FSG32CuYG2S3GVqyUGZZCKgU1I5IQw4Dmd9E0wFrnnRyZ/ +aW/AomqL+dEfwFi0p74J/+/Ph26RSiqMegwMtn7s544HCH/w0egohuC53LLBPv4DV5z +ty9rN3BMphechfvLSgjzBd9Uez/rDVEwATgu1Xw5FNB0sE++cUkiLw1tMkBo0UYe2ot Cf7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iS1Rxbc0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm2si1155454ejc.334.2020.09.17.19.05.35; Thu, 17 Sep 2020 19:05:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iS1Rxbc0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726790AbgIRCCe (ORCPT + 99 others); Thu, 17 Sep 2020 22:02:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:47700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726748AbgIRCCa (ORCPT ); Thu, 17 Sep 2020 22:02:30 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1CF2723600; Fri, 18 Sep 2020 02:02:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394543; bh=94AT0YPweooXiO7gK1/oiuOCZdrXc0s4UM0WFbWcmvc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iS1Rxbc0CCY58xmRtYS5WrRfn0czB2PtDlF1nafb+/CDWODLtrsp6NhXS/0UkJVLR rvVlzbU6IKFBfOxDrMgnnjdRJmqea2erbCi2TErmGZa0cexetY2nTWnoESx0PcX2mE dgLPk3WAqIW1zWyFHPUj+AlWNMbkslPANvvorrXg= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chuck Lever , Trond Myklebust , Sasha Levin , linux-nfs@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 061/330] SUNRPC: Capture completion of all RPC tasks Date: Thu, 17 Sep 2020 21:56:41 -0400 Message-Id: <20200918020110.2063155-61-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuck Lever [ 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 Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- include/trace/events/sunrpc.h | 1 + net/sunrpc/sched.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index ffa3c51dbb1a0..28df77a948e56 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h @@ -165,6 +165,7 @@ DECLARE_EVENT_CLASS(rpc_task_running, DEFINE_RPC_RUNNING_EVENT(begin); DEFINE_RPC_RUNNING_EVENT(run_action); DEFINE_RPC_RUNNING_EVENT(complete); +DEFINE_RPC_RUNNING_EVENT(end); DECLARE_EVENT_CLASS(rpc_task_queued, diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 987c4b1f0b174..9c79548c68474 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -824,6 +824,7 @@ rpc_reset_task_statistics(struct rpc_task *task) */ void rpc_exit_task(struct rpc_task *task) { + trace_rpc_task_end(task, task->tk_action); task->tk_action = NULL; if (task->tk_ops->rpc_count_stats) task->tk_ops->rpc_count_stats(task, task->tk_calldata); -- 2.25.1