From: Chuck Lever <chuck.lever@oracle.com>
To: Jeff Layton <jlayton@kernel.org>, 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>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>
Cc: Sargun Dillon <sargun@meta.com>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH 3/4] nfsd: add some stub tracepoints around key vfs functions
Date: Thu, 6 Mar 2025 12:40:50 -0500 [thread overview]
Message-ID: <31ce6d1c-b036-4a7d-a888-47a62a195dba@oracle.com> (raw)
In-Reply-To: <e3155f911895be8384b8d522738d8a8e95c8ced5.camel@kernel.org>
On 3/6/25 11:28 AM, Jeff Layton wrote:
> On Thu, 2025-03-06 at 09:29 -0500, Chuck Lever wrote:
>> On 3/6/25 7:38 AM, Jeff Layton wrote:
>>> Sargun set up kprobes to add some of these tracepoints. Convert them to
>>> simple static tracepoints. These are pretty sparse for now, but they
>>> could be expanded in the future as needed.
>>
>> I have mixed feelings about this.
To be very clear: I'm always up for better observability! The details of
this patch are where I start to have some hesitation.
>> - Probably tracepoints should replace the existing dprintk call sites.
>> dprintk is kind of useless for heavy traffic.
>>
>
> I'm fine with removing dprintks as we go.
Removing them was controversial a few years ago when I first brought
this up... I would very much like to see these call sites gone, even if
we don't have immediate replacements in the form of trace points.
>> - Seems like other existing tracepoints could report most of the same
>> information. fh_verify, for example, has a tracepoint that reports
>> the file handle. There's an svc proc tracepoint, and an NFSv4 COMPOUND
>> tracepoint that can report XID and procedure.
>>
>
> The problem there is the lack of context. Yes, I can see that
> fh_verify() got called, but on a busy server it can be hard to tell why
> it got called. I see things like the fh_verify() tracepoint working in
> conjunction with these new tracepoints. IOW, you could match up the
> xids and see which fh_verify() was called for which operation.
If we're talking about NFSv3 only, sunrpc:svc_process records the XID,
nfsd thread, NFSv3 procedure name, and NFSD namespace of each incoming
RPC call. You also get the NFS client's IP address.
You can also enable nfsd:nfsd_fh_verify to capture several of those
items, plus the NFS file handle.
The kernel process information will be identical for both the svc_proc
and nfsd_fh_verify trace points -- that will tie the two records
together so you can match an XID to an NFS procedure and its file handle
argument.
If you want to see a little more you can enable the function_graph
plug-in for nfsd_dispatch().
Another approach is adding trace points in the XDR layer to capture
all of the arguments of incoming RPC calls:
https://web.git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/log/?h=topic-xdr-tracepoints
--
Chuck Lever
next prev parent reply other threads:[~2025-03-06 17:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 12:38 [PATCH 0/4] nfsd: observability improvements Jeff Layton
2025-03-06 12:38 ` [PATCH 1/4] nfsd: add commit start/done tracepoints around nfsd_commit() Jeff Layton
2025-03-06 12:38 ` [PATCH 2/4] nfsd: add a tracepoint for nfsd_setattr Jeff Layton
2025-03-06 14:19 ` Chuck Lever
2025-03-06 12:38 ` [PATCH 3/4] nfsd: add some stub tracepoints around key vfs functions Jeff Layton
2025-03-06 14:29 ` Chuck Lever
2025-03-06 16:28 ` Jeff Layton
2025-03-06 17:40 ` Chuck Lever [this message]
2025-03-06 12:38 ` [PATCH 4/4] sunrpc: keep a count of when there are no threads available Jeff Layton
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=31ce6d1c-b036-4a7d-a888-47a62a195dba@oracle.com \
--to=chuck.lever@oracle.com \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jlayton@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=okorniev@redhat.com \
--cc=pabeni@redhat.com \
--cc=sargun@meta.com \
--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