From patchwork Mon Dec 16 20:41:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13910513 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 EFF4CE77183 for ; Mon, 16 Dec 2024 20:45:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8A3386B00CB; Mon, 16 Dec 2024 15:45:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 82AB36B00D7; Mon, 16 Dec 2024 15:45:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A5136B00D8; Mon, 16 Dec 2024 15:45:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 493C36B00CB for ; Mon, 16 Dec 2024 15:45:31 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 0B70740437 for ; Mon, 16 Dec 2024 20:45:31 +0000 (UTC) X-FDA: 82902000720.20.A377DAE Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf12.hostedemail.com (Postfix) with ESMTP id 5310D4000D for ; Mon, 16 Dec 2024 20:45:16 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Hz9QLnhO; spf=pass (imf12.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=1734381906; 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=FsZWmcTe42ScY8ba6uO0qZwrmPUVRihV7ISFnpbWdKn2B8qclhx2xzuuo4Tpd2nOjDGpXR HcpQsNowtanSpwLGtXYShAwz2Ec6UCIqKZflnEbvAx0dnZhn18EovDhA460UPO0KQ81xcC r+sYd9ByLDHUAtFbxcLXuIn6uCAlgzI= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Hz9QLnhO; spf=pass (imf12.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=1734381906; a=rsa-sha256; cv=none; b=cl6z3zjVa8yI252q9uVa1i0HpUhSI4HqE9wysyiZT2b4rPKiFqBq6UFgkM+Es/w2HhfdUx paY4oT90mBCZavxWAZeajNM4cKkGu8ctQ3jyLlH9lkUM4noYkShTAwu8QgDA0FKeIIG7DS 1T8zODwV+yK33WOTktQuGFjs9VliYh4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734381928; 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=Hz9QLnhOoKVe9BXonNdGQgYEqu2OI9IrruB8zpMD+4Onfizw0I3Nr+Bl7oKsKH3reTsgyf pe+Nse8Nl/dFzwVA0dDU6lVuyff7U1G63ZFKap15pzdsCOFJ/vtFfZpFa276mk7WZnwX9s TUk7Qv1Gba9y2jmFW9GuedyYvX0tzDU= 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-414-iogA43IpO2u-q6bhJpDhNg-1; Mon, 16 Dec 2024 15:45:24 -0500 X-MC-Unique: iogA43IpO2u-q6bhJpDhNg-1 X-Mimecast-MFC-AGG-ID: iogA43IpO2u-q6bhJpDhNg 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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 21E7B1956048; Mon, 16 Dec 2024 20:45:21 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.48]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 944C81956053; Mon, 16 Dec 2024 20:45:15 +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 v5 31/32] afs: Add a tracepoint for afs_read_receive() Date: Mon, 16 Dec 2024 20:41:21 +0000 Message-ID: <20241216204124.3752367-32-dhowells@redhat.com> In-Reply-To: <20241216204124.3752367-1-dhowells@redhat.com> References: <20241216204124.3752367-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Rspamd-Queue-Id: 5310D4000D X-Rspamd-Server: rspam12 X-Stat-Signature: dy7a7y6df194yewajndjqbbzx15rxcni X-Rspam-User: X-HE-Tag: 1734381916-375241 X-HE-Meta: U2FsdGVkX19I7rRDAOkhiue6FAHWb4AO9GVdR7zD5fw/3hD6Ubyv3Tk8TOY77r8BL7rE0IEvjVEkmR1XUc9kQ3Fx4SxrFOmfiu8/olLJu75MV4lvcQEvKlQda9nzLyc/hmRufJaE3kjWr70U6Bx/4AVfLbbtYMqHCgQKA0GBYxb/eXTbhAbRfss0wCflcaeT8HSGHsELXKvEfHsKPYsjpP0eoroa/sBW/ZtBFwjiMlNpq1TjtjsQsdssXUdXGuz5LDE+0Q4uWQptECVpnM4wPS3sWO6H3tPSQPDsEvPATjJ3cy2WWbmP7/5726GB7hpAv0lm5xMlT9Fmxebp74wQyAj0oScGNBM1Day+oIXsoS8lWwi+grXfFYm+yV2mXnQvaCIL60m+tJhwoybZitXfmPWPmc2X/di+/skb4yCqeQcZQSYgSFBXvVq7GUdhihVtWKc76rM4B/y2R2j9eSPuHiyw+Tli533QAskDDzVnpdbGQjvtYdY94L0gJXWA3pKWpnzARUhShvvFbO9ielakGxYPTtSSxE10/vn1SNOactrsqF7tI3bVhYRBjd+kDujLOzmJGPEQiDeYLN9ESEnx6eweHvN5yW7phG08SS2A0QaZRkEIX3XY0Hs8M7jYOH7n96zcPp/vYOX4qMcN8JnaavkXilCcWQDjGwzH8tRONzq6Jk1sVFP8JODsa9QR3GhYvWpgDPQT19lFcsFrlqBC+loEM2Q6OBa5ACIDn2fm/UkLaS84fAYQR6N6lq+15Lt1NwaRiteeP3MdKGv7R2SsBpqR8wD9EtswSX42XPXov5WYe3DI64dlnSAwcHsZR+DrE5j/3fxnExAoHOsFV3mlBtBfFWR4RWbCCqAXBCtRODUgFQCurA0zdbwVeyjm6VRTKxfi7wuAgpw4+R+zNT8Uk3oJZ7HUmRZrZUYGeFeBi1C4E9zuQlgytefIV2qTMuVuZMVavlvroMXP0gsVsuQ XZ2uCVz7 eFvivetKa1CTHvvYOgNZRq54GiZ7AkkBsvpLavTrJGZ2eryFALRGV+7jPRMcsrmXX5gxR9ZS2H2IsI2xDh1MjiYUcUa2EGLETBES9fGhM1hySI1OnzPf0+n5jUL26SUCZ/8KchuFvU7Qmtdw5oWw/u5B0MWJVto3KYfgk7Yt6cfOXTkNo3tAEBbDSQooRLEMqjSHCpxj2QwkD+HkgXAmt6SQ6XF8lTVLwFKL+XejP5cYvczglYgwJ5eidBizhGvayp1cYtJeuWjlMXzbg+bGV4tfuSJA16IxPYVJYSZBuHVoW8+9ciIR/uWkLufanPOw9jUlJQYa4i6NpnDf3Ii+AcqN9dCdE5HU0yAAXTnRHQxZfbTM4ipsFbb+8XeYI8dEDkArcDB9ccBOioOzvQvYDBLW1F2/lv9b6iW3v09VxM8FUxUg6BGvLsRdiw9iK9fMr1bZfqu+Cj0+KT9O6Kc1jG4hOBWIrdi05m63KsIPzZmbJUwAMEw76rCsNjMADStlXh0Mjt4KrdrY3oRQ= 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 */