From patchwork Fri Nov 8 17:32:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13868590 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B339FD64072 for ; Fri, 8 Nov 2024 17:36:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 42B6C6B009A; Fri, 8 Nov 2024 12:36:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3B2F16B009D; Fri, 8 Nov 2024 12:36:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 22BED6B009E; Fri, 8 Nov 2024 12:36:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id EB32B6B009A for ; Fri, 8 Nov 2024 12:36:49 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id A85A61C6A87 for ; Fri, 8 Nov 2024 17:36:49 +0000 (UTC) X-FDA: 82763632098.05.6D69291 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf15.hostedemail.com (Postfix) with ESMTP id 237F9A0020 for ; Fri, 8 Nov 2024 17:36:09 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eMZRMaRW; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf15.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731087282; a=rsa-sha256; cv=none; b=pwy7IFOXZYmvAfDlXmaFdfOkN4+t07J0J7+apu2H7V7Serth1WrvFTOchYgSd2P+Emr8v4 KsidBhzpL4rxA/e/D+UhATxO9nvu3FqHS5wPpaKcK54+VS8+RIF7S2hvGeFsRCLpjf4ulB 9RyqmsXxoNJCtrTzOjE8I/hgOutw6uU= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eMZRMaRW; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf15.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731087282; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QCDL9BqA4pDDX31tPDuoaoWVDY2hJyHDwXlxpfOucp0=; b=Oa9ER65A3L4dfM6A5ZhGjcRJLqjpXiJoHj0eoByzb3B6Bg8DpIEGZbuNYmY/YwItnBUmK0 Rpe/l5iRb6oOkrRizqkjfuGg6cJeEVFRm7Ez+ABggtsVK/PuB+45pnfiWC2BkwNE9788Mr iBwACEk0i6xhgqPu6vKqvJLU2nGpXpk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731087407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QCDL9BqA4pDDX31tPDuoaoWVDY2hJyHDwXlxpfOucp0=; b=eMZRMaRWS5NiN2VieZHlZYk4HgQqyyZtuBjhZG6enAjPjuaOV1RYTYEbqVA2SO8KlFhcZw aIMYxhhOemtm7Z5jGfBc6c/yeeG7l/dVJ4QQAsFk63jfMHfIfP7UPyfuFaU79h6SzugH7T 3XSmJCzAckXpplxy9G+JxqXLYibFD2k= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-222-bt92h9XNNfuuPtpTLYdiAw-1; Fri, 08 Nov 2024 12:36:44 -0500 X-MC-Unique: bt92h9XNNfuuPtpTLYdiAw-1 X-Mimecast-MFC-AGG-ID: bt92h9XNNfuuPtpTLYdiAw Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3A6A8195609F; Fri, 8 Nov 2024 17:36:36 +0000 (UTC) Received: from warthog.procyon.org.uk.com (unknown [10.42.28.231]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BF7EA1953880; Fri, 8 Nov 2024 17:36:30 +0000 (UTC) From: David Howells To: Christian Brauner , Steve French , Matthew Wilcox Cc: David Howells , Jeff Layton , Gao Xiang , Dominique Martinet , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Eric Van Hensbergen , Ilya Dryomov , netfs@lists.linux.dev, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 32/33] afs: Add a tracepoint for afs_read_receive() Date: Fri, 8 Nov 2024 17:32:33 +0000 Message-ID: <20241108173236.1382366-33-dhowells@redhat.com> In-Reply-To: <20241108173236.1382366-1-dhowells@redhat.com> References: <20241108173236.1382366-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Rspamd-Queue-Id: 237F9A0020 X-Stat-Signature: yqpijj8imuqcr8ii91rsfftxxby5w89p X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1731087369-563849 X-HE-Meta: U2FsdGVkX18gQNY6vpq4qyyixJeKbD2eygfwrY70xpJNVfwS3dUX3JRPnffzxRupf4bDGeYJlvYcpczIm+6lCZzumT+nKcYbnO332Rz6AWfl1rYBAnLUUGaNHT5USS5poe7eTLKRy3X8nlS/edYRPbxfgvfaHIfu4zWiJr984fXaUr99abI20rQJnaD9pUbF69fqUQmQAUDp3d6QNmkMUsrLby1iIKj7mx951REeJn/lXTWMUOO/vy/jndXuHVEjhSHx6RRmNlU2nvUW1XPPXHvqmRrd8PP0lcOyLRaZ1FoDPblasP36iqo0l3a3/vCjgge0+jyOhuYA2Qa0k/cLMyG4bsT9QtMOK0lZTlBviGaBXA5SZ2hrqCi1pvHLw+QYnlGUgp51vfj6vQCDwH9EZ3W3NmTCOKNdGW8b7OSFHlSiRY0pvamBda2MJs9HCrGnGdBPNRgCQ8z3x5SJt4+klI844v/t4qyAYrwtI63cY5FbmLysa6BbEgZZimuvM/4bulpXk236VYS8O5oUr6pCd5vtY0hRE3P2XZuyHPgBUxtFDsGgp988Wg0q9xXWphn7rcroIQMN8Wwzetkxn1Izw5CyBjIq3Tx5woMptk0hkQL7zLHiEUjpf2Q5hyb/HqEAavKC7PmpZf4JPsINh/NZhi29dXCavQGFq8/CKHeFI+Q3ssCVmyjfmkJtI6oLSCWmYOB+ge/NncWTh4nBy3X6aj4w7nwVS7fIWT6xXRpkFEHAbegJuexcrzCyC4W9LRSiT3NU4ywJ0alNYEOkA4FKLTWOentQfsgELCVZf/y6Ln4zYWeQivB1QuTjPFq6lDAy7Z8Jh+dCQlsVxA/zDn89zKircFjJqWJA1WtVlT4s/6zUWNj8ev5Ow4Ff7+Dv/Gb4hVFWfojlxCA922R4sFvc2q9svUD6qsWIH4VDr+KTL6vrnB5PsdX+k89fLzAG7cB8WDqUMkziDM6M6ZkW2wk 1mVxSsIY cJHwJkzGsIzXnNxN9aAAkarZY0RV8yW6Um8p0ARZTk902bU0GILb+vnqBPxGgLb8hK+65GdBDSKcg9i+b+Pu5d98/RWdeLjxnW/qaCQAxf87+HKqN+cQNhnaeYJJymgR1SwcnsXhKqsLMqLqEMVtgx9Ck1sA2jFvrKmiGf9CmYXlVpMkXPnLv6sanuz//iuxaEtSbeyhHSwmxJTLuOERhhepkyGe1nRIFg/kqZZfCnSvRZyrsUdc8br6IHfLnwqo+vXwlKvp1CrdzJ/3z0ghFsr3U3rwJ/+z3kGQgl51qziiRtbIbqnGVfAE+6dPZ3kICA89Yii4nYS63enb2i1Z5zPQrLxQE4FaRtZncxbXZPJ89lKCyWEicU54pogcGckmSowZivwWl56B2BIjRDJTQbvF3euo8pzQW92Xu8QA+sxiI2dzOHTlMsjm0W22qsDIE/umb1OL1uXjyZXdrHuD1oDX/w4XLG3VTYEFU0yVMNCDsO6Q= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Add a tracepoint for afs_read_receive() to allow potential missed wakeups to be debugged. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org --- fs/afs/file.c | 1 + include/trace/events/afs.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/fs/afs/file.c b/fs/afs/file.c index c296efebb491..fc15497608c6 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -274,6 +274,7 @@ static void afs_read_receive(struct afs_call *call) state = READ_ONCE(call->state); if (state == AFS_CALL_COMPLETE) return; + trace_afs_read_recv(op, call); while (state < AFS_CALL_COMPLETE && READ_ONCE(call->need_attention)) { WRITE_ONCE(call->need_attention, false); diff --git a/include/trace/events/afs.h b/include/trace/events/afs.h index c52fd83ca9b7..2e92487f3f34 100644 --- a/include/trace/events/afs.h +++ b/include/trace/events/afs.h @@ -1775,6 +1775,36 @@ TRACE_EVENT(afs_make_call, __entry->fid.unique) ); +TRACE_EVENT(afs_read_recv, + TP_PROTO(const struct afs_operation *op, const struct afs_call *call), + + TP_ARGS(op, call), + + TP_STRUCT__entry( + __field(unsigned int, rreq) + __field(unsigned int, sreq) + __field(unsigned int, op) + __field(unsigned int, op_flags) + __field(unsigned int, call) + __field(enum afs_call_state, call_state) + ), + + TP_fast_assign( + __entry->op = op->debug_id; + __entry->sreq = op->fetch.subreq->debug_index; + __entry->rreq = op->fetch.subreq->rreq->debug_id; + __entry->op_flags = op->flags; + __entry->call = call->debug_id; + __entry->call_state = call->state; + ), + + TP_printk("R=%08x[%x] OP=%08x c=%08x cs=%x of=%x", + __entry->rreq, __entry->sreq, + __entry->op, + __entry->call, __entry->call_state, + __entry->op_flags) + ); + #endif /* _TRACE_AFS_H */ /* This part must be outside protection */