From: Olga Kornievskaia <aglo@umich.edu>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Dave Wysochanski <dwysocha@redhat.com>,
"J. Bruce Fields" <bfields@fieldses.org>,
linux-nfs <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH RFC 09/21] NFSD: Add an nfsd_cb_offload tracepoint
Date: Fri, 14 May 2021 14:22:38 -0400 [thread overview]
Message-ID: <CAN-5tyEOW8bgsSsM2euG3JZ7oOd58Ee6hCGHu52SEUoSKRoFdw@mail.gmail.com> (raw)
In-Reply-To: <162066195300.94415.3319200148715325125.stgit@klimt.1015granger.net>
Hi Chuck,
On Mon, May 10, 2021 at 12:05 PM Chuck Lever <chuck.lever@oracle.com> wrote:
>
> Record the arguments of CB_OFFLOAD callbacks so we can better
> observe asynchronous copy-offload behavior. For example:
>
> nfsd-995 [008] 7721.934222: nfsd_cb_offload: addr=192.168.2.51:0 client 6092a47c:35a43fc1 fh_hash=0x8739113a
I like the idea but can we include copy->nfserr if there is one and/or
if not then size copied?
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> Cc: Olga Kornievskaia <kolga@netapp.com>
> Cc: Dai Ngo <Dai.Ngo@oracle.com>
> ---
> fs/nfsd/nfs4proc.c | 1 +
> fs/nfsd/trace.h | 30 ++++++++++++++++++++++++++++++
> 2 files changed, 31 insertions(+)
>
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index daf43b980d4b..7a13f6c848c6 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -1497,6 +1497,7 @@ static int nfsd4_do_async_copy(void *data)
> memcpy(&cb_copy->fh, ©->fh, sizeof(copy->fh));
> nfsd4_init_cb(&cb_copy->cp_cb, cb_copy->cp_clp,
> &nfsd4_cb_offload_ops, NFSPROC4_CLNT_CB_OFFLOAD);
> + trace_nfsd_cb_offload(copy->cp_clp, ©->cp_res.cb_stateid, ©->fh);
> nfsd4_run_cb(&cb_copy->cp_cb);
> out:
> if (!copy->cp_intra)
> diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h
> index 1dce41b3bd4d..15cacbdac411 100644
> --- a/fs/nfsd/trace.h
> +++ b/fs/nfsd/trace.h
> @@ -1004,6 +1004,36 @@ TRACE_EVENT(nfsd_cb_notify_lock,
> __entry->fh_hash)
> );
>
> +TRACE_EVENT(nfsd_cb_offload,
> + TP_PROTO(
> + const struct nfs4_client *clp,
> + const stateid_t *stp,
> + const struct knfsd_fh *fh
> + ),
> + TP_ARGS(clp, stp, fh),
> + TP_STRUCT__entry(
> + __field(u32, cl_boot)
> + __field(u32, cl_id)
> + __field(u32, si_id)
> + __field(u32, si_generation)
> + __field(u32, fh_hash)
> + __array(unsigned char, addr, sizeof(struct sockaddr_in6))
> + ),
> + TP_fast_assign(
> + __entry->cl_boot = stp->si_opaque.so_clid.cl_boot;
> + __entry->cl_id = stp->si_opaque.so_clid.cl_id;
> + __entry->si_id = stp->si_opaque.so_id;
> + __entry->si_generation = stp->si_generation;
> + __entry->fh_hash = knfsd_fh_hash(fh);
> + memcpy(__entry->addr, &clp->cl_cb_conn.cb_addr,
> + sizeof(struct sockaddr_in6));
> + ),
> + TP_printk("addr=%pISpc client %08x:%08x stateid %08x:%08x fh_hash=0x%08x",
> + __entry->addr, __entry->cl_boot, __entry->cl_id,
> + __entry->si_id, __entry->si_generation,
> + __entry->fh_hash)
> +);
> +
> #endif /* _NFSD_TRACE_H */
>
> #undef TRACE_INCLUDE_PATH
>
>
next prev parent reply other threads:[~2021-05-14 18:22 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 15:51 [PATCH RFC 00/21] NFSD callback and lease management observability Chuck Lever
2021-05-10 15:51 ` [PATCH RFC 01/21] NFSD: Constify @fh argument of knfsd_fh_hash() Chuck Lever
2021-05-10 15:51 ` [PATCH RFC 02/21] NFSD: Capture every CB state transition Chuck Lever
2021-05-10 15:51 ` [PATCH RFC 03/21] NFSD: Drop TRACE_DEFINE_ENUM for NFSD4_CB_<state> macros Chuck Lever
2021-05-10 15:52 ` [PATCH RFC 04/21] NFSD: Add cb_lost tracepoint Chuck Lever
2021-05-10 15:52 ` [PATCH RFC 05/21] NFSD: Adjust cb_shutdown tracepoint Chuck Lever
2021-05-10 15:52 ` [PATCH RFC 06/21] NFSD: Remove spurious cb_setup_err tracepoint Chuck Lever
2021-05-10 20:27 ` J. Bruce Fields
2021-05-10 20:29 ` Chuck Lever III
2021-05-11 17:44 ` Bruce Fields
2021-05-10 15:52 ` [PATCH RFC 07/21] NFSD: Enhance the nfsd_cb_setup tracepoint Chuck Lever
2021-05-10 15:52 ` [PATCH RFC 08/21] NFSD: Add an nfsd_cb_lm_notify tracepoint Chuck Lever
2021-05-10 15:52 ` [PATCH RFC 09/21] NFSD: Add an nfsd_cb_offload tracepoint Chuck Lever
2021-05-14 18:22 ` Olga Kornievskaia [this message]
2021-05-14 19:11 ` Chuck Lever III
2021-05-10 15:52 ` [PATCH RFC 10/21] NFSD: Replace the nfsd_deleg_break tracepoint Chuck Lever
2021-05-10 15:52 ` [PATCH RFC 11/21] NFSD: Add an nfsd_cb_probe tracepoint Chuck Lever
2021-05-10 15:52 ` [PATCH RFC 12/21] NFSD: Remove the nfsd_cb_work and nfsd_cb_done tracepoints Chuck Lever
2021-05-10 15:52 ` [PATCH RFC 13/21] NFSD: Update nfsd_cb_args tracepoint Chuck Lever
2021-05-10 15:53 ` [PATCH RFC 14/21] NFSD: Add nfsd_clid_cred_mismatch tracepoint Chuck Lever
2021-05-10 15:53 ` [PATCH RFC 15/21] NFSD: Add nfsd_clid_verf_mismatch tracepoint Chuck Lever
2021-05-11 15:49 ` J. Bruce Fields
2021-05-10 15:53 ` [PATCH RFC 16/21] NFSD: Remove nfsd_clid_inuse_err Chuck Lever
2021-05-10 15:53 ` [PATCH RFC 17/21] NFSD: Add nfsd_clid_confirmed tracepoint Chuck Lever
2021-05-10 15:53 ` [PATCH RFC 18/21] NFSD: Add nfsd_clid_destroyed tracepoint Chuck Lever
2021-05-10 15:53 ` [PATCH RFC 19/21] NFSD: Add a couple more nfsd_clid_expired call sites Chuck Lever
2021-05-10 15:53 ` [PATCH RFC 20/21] NFSD: Rename nfsd_clid_class Chuck Lever
2021-05-10 15:53 ` [PATCH RFC 21/21] NFSD: Add tracepoints to observe clientID activity Chuck Lever
2021-05-10 19:56 ` David Wysochanski
2021-05-10 20:00 ` Chuck Lever III
2021-05-11 15:59 ` Chuck Lever III
2021-05-11 17:38 ` Bruce Fields
2021-05-11 17:40 ` Chuck Lever III
2021-05-11 17:43 ` Bruce Fields
2021-05-10 17:24 ` [PATCH RFC 00/21] NFSD callback and lease management observability David Wysochanski
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=CAN-5tyEOW8bgsSsM2euG3JZ7oOd58Ee6hCGHu52SEUoSKRoFdw@mail.gmail.com \
--to=aglo@umich.edu \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=dwysocha@redhat.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;
as well as URLs for NNTP newsgroup(s).