From patchwork Fri Oct 25 20:39:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13851758 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 BD792D149F2 for ; Fri, 25 Oct 2024 20:43:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 504378D0003; Fri, 25 Oct 2024 16:43:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 48B518D0001; Fri, 25 Oct 2024 16:43:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2BB738D0003; Fri, 25 Oct 2024 16:43:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 0147B8D0001 for ; Fri, 25 Oct 2024 16:43:43 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id F08A71C6F14 for ; Fri, 25 Oct 2024 20:43:20 +0000 (UTC) X-FDA: 82713300264.05.5B5BE92 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf17.hostedemail.com (Postfix) with ESMTP id 9A42440018 for ; Fri, 25 Oct 2024 20:43:26 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WZUT2W0j; spf=pass (imf17.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729888816; 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=e0urA38A4ADOiCMpfN0uGJZmadb1R6bcZLrketz8DnY=; b=bkGq4qd0sxn6vP3VeHQVoAzbb7EceJxTTrgRyMuJUUxzNDNRfBqZOrvjn+/4+/DL1JYF1z itm0jbieMMWCV3GcUhVPIbvqdhqkQXQEQzGK5+iEpAVgDFoguON23s0QNJQgoVhw0OFxZI vabxY4kCut6F6lCUuf4plDHhAtyIQzk= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WZUT2W0j; spf=pass (imf17.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729888816; a=rsa-sha256; cv=none; b=Jj4cAWL/CII1BepxHxvXfKX3QxumKjcBTQ4AeWF5LacHz6MrOnrCHoUNLNYnOMkYP5Q8hs oU1QQe95mB9lHu017Z/w5ZhET6UO0Ah6LrRCAeLKExQZwNubcDU0PoxDWflkUJi2dHgywT RhPQyhp0ykp1Cmes9WoS11cgerHveZk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729889021; 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=e0urA38A4ADOiCMpfN0uGJZmadb1R6bcZLrketz8DnY=; b=WZUT2W0jHOGRkJfNKCxU8UdWFnngFmnXshYOx3O1oLA0rEhKpChli/rfCvJT+gQlzA81lF yWJ0i/cEQF+nr2PSHB/VORpx/rSMD4NOwHGWeRU0a/6mnMd/KZxrFLQMs88IRl5lGl7Y/k DaitvTqfRlOqJZCxSs9A2/gyfiJQY/E= Received: from mx-prod-mc-03.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-458-bOhXfy4qM0m2gI-6uqYeIg-1; Fri, 25 Oct 2024 16:43:38 -0400 X-MC-Unique: bOhXfy4qM0m2gI-6uqYeIg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6085719560B8; Fri, 25 Oct 2024 20:43:35 +0000 (UTC) Received: from warthog.procyon.org.uk.com (unknown [10.42.28.231]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8AAD3196BB7E; Fri, 25 Oct 2024 20:43: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 v2 30/31] afs: Add a tracepoint for afs_read_receive() Date: Fri, 25 Oct 2024 21:39:57 +0100 Message-ID: <20241025204008.4076565-31-dhowells@redhat.com> In-Reply-To: <20241025204008.4076565-1-dhowells@redhat.com> References: <20241025204008.4076565-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 9A42440018 X-Stat-Signature: mhgbeg5z364auhff6zeifpguz7iwth8c X-Rspam-User: X-HE-Tag: 1729889006-626312 X-HE-Meta: U2FsdGVkX19k1Wz/PDC5ohbYOm6wzwFfZBATnWctZ88ADSr0qbkW30Hf0H4gXcdSxFv6vYrmH2FaN6SQnpcAImOs/TWyEGAHnS3Qn49AO2WKWxgTXpdAkibAXQfL6l+qlgMEd6M8u5pt6o423keraBK8aQX/dNlhjzGn4HSloNX+JEa84vERIpE0ETMLZg4I8I3C6OOtk69QYamANMNDyc6QsELLpV2jDvWMGRmzqTnbmLYwJLGgjC7mphOztGeQdBSHCQbp6Wi1wkWxaMLnzNGSgiSgtVSNP6K3r6CQFJOO/+BrXegh9/F+gb+buzOH+7qLDg/GAdAX+Mjgk8ybo/v8awJfgD3+d5Giy2Mlmj3KLX4RKNeMX80Oy8DPub+bDRYXOSw58ep+DsDnl/xRUqVk1B17wXFbbL1wNcqae8zoxaM6S00nlmTgy0O1yoB0+E/q92a7+sVYyBfNREUZLs7CM3hLEuq7o14oXfwi0TH/auuVYfNNmej+Z+NR1osiZeb9ELOh7QER5hH1iCnwKfEtuF39hIWb7rZYq0qOmZ+R6a+c1rcJdEMa4TdAtk8eycG8XVG/iV4Wqwf8u5C64MP0enqKkTxeEGbzKf/5jf3plxju8pa0O3ar4bPjhobMojpvXV1nCSLYzi6kthsfwzIw1wXrgEB/ZTCQJ6g3ntDnO75+FCJlY8Fu7xhgooXwU9iYC10qGQ3yQKAkSF2GQSz/q1rea4uOgMlrk/9Gnx4cM9iB/7JTFfkH+vpftfgAUctHGO1m0/2Xs48U/3SYbP8Ncx/1vpoFgpIvI5NGhOSbpC6whOVrBRCZIuIHA6beMDFeqINN8evAVAqiJJJ7vMxDNHdvIa35Eq5p+ygTHhpNPxlJdin/GsWu2H6tTr0qjLjmXKu5FHIMw1kRCJGQbZ4u8/4NSl8xmdJUgIrVk0DV+Tt5LRvMu0MQXY+l+GqVRFwrNKPkDAuj3Ejq0BE 7WvGFLAc tvUnvjV3QL4du1pI/bGStfhIu++geaswtukExvBggFu6ADRAdA9gKIn3hSJvdO9ueWFQMLG1HPDU1HinHT4cNy1p7+BdXt8hjv0Ema+lP/YHi9ZyZw4j/s4Zu//b55H45TY7zNEteGBFKErjAWFC616ArJnRLqpXLAHqL+sV84kSj6UC3vERqQ8bLpdgdp942nTvtOdvkLcomE3Hzs78K1zf8iCLFpHb8PKBo5D6ljk8c+4dIdQvQnwWfw3R0/KvKHEG8ZZDFecYEjNReEaJvjOYlXrYvGFl/yv9XIeR3nhgc8umrNJc0Jhrz9GoWVgM2wOK7sLzsgMG7ZwYObCK9zB2DKUx2bB3uYzvP+iaXRRWKoRiT56kp7exdSXY57h04yrUkIOEqJzYzxpx9CK/nz3N+lbTu53asCugdB1ThfEy3WW0M+xRUBSR6nBJ1pzE1A9c5iuKX2A929o7iQw/6vZoidex8BAqczHwKH2d+oNz3/Q0= 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 e89a98735317..dbc108c6cae5 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -270,6 +270,7 @@ static void afs_read_receive(struct afs_call *call) enum afs_call_state state; _enter(""); + trace_afs_read_recv(op, call); state = READ_ONCE(call->state); if (state == AFS_CALL_COMPLETE) diff --git a/include/trace/events/afs.h b/include/trace/events/afs.h index 020ab7302a6b..8da64c9d25e6 100644 --- a/include/trace/events/afs.h +++ b/include/trace/events/afs.h @@ -1773,6 +1773,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 */