linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>, Neil Brown <neilb@suse.de>,
	 Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>,  Tom Talpey <tom@talpey.com>,
	Trond Myklebust <trondmy@kernel.org>,
	 Anna Schumaker <anna@kernel.org>
Cc: Sargun Dillon <sargun@sargun.me>,
	linux-nfs@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Jeff Layton <jlayton@kernel.org>
Subject: [PATCH v2 01/12] nfsd: add commit start/done tracepoints around nfsd_commit()
Date: Wed, 09 Apr 2025 10:32:23 -0400	[thread overview]
Message-ID: <20250409-nfsd-tracepoints-v2-1-cf4e084fdd9c@kernel.org> (raw)
In-Reply-To: <20250409-nfsd-tracepoints-v2-0-cf4e084fdd9c@kernel.org>

Very useful for gauging how long the vfs_fsync_range() takes.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/nfsd/trace.h | 2 ++
 fs/nfsd/vfs.c   | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h
index a7630e9f657776a9335ba68ad223641e3ed9121a..0d49fc064f7273f32c93732a993fd77bc0783f5d 100644
--- a/fs/nfsd/trace.h
+++ b/fs/nfsd/trace.h
@@ -451,6 +451,8 @@ DEFINE_NFSD_IO_EVENT(write_start);
 DEFINE_NFSD_IO_EVENT(write_opened);
 DEFINE_NFSD_IO_EVENT(write_io_done);
 DEFINE_NFSD_IO_EVENT(write_done);
+DEFINE_NFSD_IO_EVENT(commit_start);
+DEFINE_NFSD_IO_EVENT(commit_done);
 
 DECLARE_EVENT_CLASS(nfsd_err_class,
 	TP_PROTO(struct svc_rqst *rqstp,
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 86e199a758f6c69c508151fb14886f4b5da9c080..d1156a18a79579bf427fe5809dc93d06e241201e 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1366,6 +1366,8 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf,
 	loff_t			start, end;
 	struct nfsd_net		*nn;
 
+	trace_nfsd_commit_start(rqstp, fhp, offset, count);
+
 	/*
 	 * Convert the client-provided (offset, count) range to a
 	 * (start, end) range. If the client-provided range falls
@@ -1404,6 +1406,7 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf,
 	} else
 		nfsd_copy_write_verifier(verf, nn);
 
+	trace_nfsd_commit_done(rqstp, fhp, offset, count);
 	return err;
 }
 

-- 
2.49.0


  reply	other threads:[~2025-04-09 14:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09 14:32 [PATCH v2 00/12] nfsd: observability improvements Jeff Layton
2025-04-09 14:32 ` Jeff Layton [this message]
2025-04-09 14:32 ` [PATCH v2 02/12] sunrpc: add info about xprt queue times to svc_xprt_dequeue tracepoint Jeff Layton
2025-04-09 15:00   ` Chuck Lever
2025-04-09 15:26     ` Jeff Layton
2025-04-11 13:10       ` Jeff Layton
2025-04-11 13:24         ` Chuck Lever
2025-04-11 13:40           ` Jeff Layton
2025-04-09 14:32 ` [PATCH v2 03/12] sunrpc: move the SVC_RQST_EVENT_*() macros to common header Jeff Layton
2025-04-09 14:32 ` [PATCH v2 04/12] nfsd: add a tracepoint for nfsd_setattr Jeff Layton
2025-04-09 15:03   ` Chuck Lever
2025-04-09 14:32 ` [PATCH v2 05/12] nfsd: add a tracepoint to nfsd_lookup_dentry Jeff Layton
2025-04-09 14:32 ` [PATCH v2 06/12] nfsd: add tracepoints around nfsd_create events Jeff Layton
2025-04-09 15:09   ` Chuck Lever
2025-04-09 15:36     ` Jeff Layton
2025-04-09 15:38       ` Chuck Lever
2025-04-09 15:40         ` Chuck Lever
2025-04-09 16:50     ` Jeff Layton
2025-04-09 16:59       ` Chuck Lever
2025-04-09 14:32 ` [PATCH v2 07/12] nfsd: add tracepoints for symlink events Jeff Layton
2025-04-09 15:15   ` Chuck Lever
2025-04-09 14:32 ` [PATCH v2 08/12] nfsd: add tracepoints for hardlink events Jeff Layton
2025-04-09 14:32 ` [PATCH v2 09/12] nfsd: add tracepoints for unlink events Jeff Layton
2025-04-09 14:32 ` [PATCH v2 10/12] nfsd: add tracepoints to rename events Jeff Layton
2025-04-09 14:32 ` [PATCH v2 11/12] nfsd: add tracepoints for readdir events Jeff Layton
2025-04-09 14:32 ` [PATCH v2 12/12] nfsd: add tracepoint for getattr events Jeff Layton
2025-04-11 14:52 ` (subset) [PATCH v2 00/12] nfsd: observability improvements cel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250409-nfsd-tracepoints-v2-1-cf4e084fdd9c@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=okorniev@redhat.com \
    --cc=sargun@sargun.me \
    --cc=tom@talpey.com \
    --cc=trondmy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).