From: Benjamin Coddington <bcodding@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Chuck Lever <cel@kernel.org>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH RFC 07/13] NFSD: Add callback operation lifetime trace points
Date: Fri, 26 Jan 2024 09:27:00 -0500 [thread overview]
Message-ID: <04CAE4A5-E99B-4BA8-978B-894B28BF31B5@redhat.com> (raw)
In-Reply-To: <ZbO92zZkNpRomQqq@tissot.1015granger.net>
On 26 Jan 2024, at 9:12, Chuck Lever wrote:
> On Thu, Jan 25, 2024 at 04:49:17PM -0500, Benjamin Coddington wrote:
>> On 25 Jan 2024, at 11:29, Chuck Lever wrote:
>>
>>> From: Chuck Lever <chuck.lever@oracle.com>
>>>
>>> Help observe the flow of callback operations.
>>>
>>> bc_shutdown() records exactly when the backchannel RPC client is
>>> destroyed and cl_cb_client is replaced with NULL.
>>>
>>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>>> ---
>>> fs/nfsd/nfs4callback.c | 7 +++++++
>>> fs/nfsd/trace.h | 42 ++++++++++++++++++++++++++++++++++++++++++
>>> include/trace/misc/nfs.h | 34 ++++++++++++++++++++++++++++++++++
>>> 3 files changed, 83 insertions(+)
>>>
>>> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
>>> index 1c85426830b1..4d5a6370b92c 100644
>>> --- a/fs/nfsd/nfs4callback.c
>>> +++ b/fs/nfsd/nfs4callback.c
>>> @@ -887,6 +887,7 @@ static struct workqueue_struct *callback_wq;
>>>
>>> static bool nfsd4_queue_cb(struct nfsd4_callback *cb)
>>> {
>>> + trace_nfsd_cb_queue(cb->cb_clp, cb);
>>> return queue_work(callback_wq, &cb->cb_work);
>>> }
>>>
>>> @@ -1106,6 +1107,7 @@ static void nfsd41_destroy_cb(struct nfsd4_callback *cb)
>>> {
>>> struct nfs4_client *clp = cb->cb_clp;
>>>
>>> + trace_nfsd_cb_destroy(clp, cb);
>>> nfsd41_cb_release_slot(cb);
>>> if (cb->cb_ops && cb->cb_ops->release)
>>> cb->cb_ops->release(cb);
>>> @@ -1220,6 +1222,7 @@ static bool nfsd4_cb_sequence_done(struct rpc_task *task, struct nfsd4_callback
>>> goto out;
>>> need_restart:
>>> if (!test_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags)) {
>>> + trace_nfsd_cb_restart(clp, cb);
>>> task->tk_status = 0;
>>> cb->cb_need_restart = true;
>>
>> I think you want to call the tracepoint /after/ setting cb_need_restart here..
>
> Maybe?
>
> The trace point currently captures the value of cb_need_restart
> before this logic overwrites it. Is that beneficial for
> troubleshooting?
Got it, yes its better the way you have it - and the tracepoint name makes
clear we want to restart.
Ben
next prev parent reply other threads:[~2024-01-26 14:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 16:28 [PATCH RFC 00/13] NFSD backchannel fixes Chuck Lever
2024-01-25 16:28 ` [PATCH RFC 01/13] NFSD: Reset cb_seq_status after NFS4ERR_DELAY Chuck Lever
2024-01-25 20:07 ` Jeff Layton
2024-01-25 16:28 ` [PATCH RFC 02/13] NFSD: Reschedule CB operations when backchannel rpc_clnt is shut down Chuck Lever
2024-01-25 20:19 ` Jeff Layton
2024-01-25 20:29 ` Chuck Lever
2024-01-25 16:28 ` [PATCH RFC 03/13] NFSD: Retransmit callbacks after client reconnects Chuck Lever
2024-01-25 20:24 ` Jeff Layton
2024-01-25 16:29 ` [PATCH RFC 04/13] NFSD: Add nfsd_seq4_status trace event Chuck Lever
2024-01-25 16:29 ` [PATCH RFC 05/13] NFSD: Replace dprintks in nfsd4_cb_sequence_done() Chuck Lever
2024-01-25 16:29 ` [PATCH RFC 06/13] NFSD: Rename nfsd_cb_state trace point Chuck Lever
2024-01-25 16:29 ` [PATCH RFC 07/13] NFSD: Add callback operation lifetime trace points Chuck Lever
2024-01-25 21:49 ` Benjamin Coddington
2024-01-26 14:12 ` Chuck Lever
2024-01-26 14:27 ` Benjamin Coddington [this message]
2024-01-25 16:29 ` [PATCH RFC 08/13] SUNRPC: Remove EXPORT_SYMBOL_GPL for svc_process_bc() Chuck Lever
2024-01-25 16:29 ` [PATCH RFC 09/13] NFSD: Remove unused @reason argument Chuck Lever
2024-01-25 16:29 ` [PATCH RFC 10/13] NFSD: Replace comment with lockdep assertion Chuck Lever
2024-01-25 16:29 ` [PATCH RFC 11/13] NFSD: Remove BUG_ON in nfsd4_process_cb_update() Chuck Lever
2024-01-25 16:29 ` [PATCH RFC 12/13] SUNRPC: Remove stale comments Chuck Lever
2024-01-25 16:30 ` [PATCH RFC 13/13] NFSD: Remove redundant cb_seq_status initialization Chuck Lever
2024-01-25 20:41 ` [PATCH RFC 00/13] NFSD backchannel fixes Jeff Layton
2024-01-25 22:09 ` Benjamin Coddington
2024-01-26 13:56 ` Chuck Lever III
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=04CAE4A5-E99B-4BA8-978B-894B28BF31B5@redhat.com \
--to=bcodding@redhat.com \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.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