All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][SMB3] add dynamic tracepoint for smb3_qfs_done
@ 2023-09-01  6:35 Steve French
  2023-09-06  7:40 ` Shyam Prasad N
  0 siblings, 1 reply; 2+ messages in thread
From: Steve French @ 2023-09-01  6:35 UTC (permalink / raw)
  To: CIFS; +Cc: Shyam Prasad N, Bharath S M

[-- Attachment #1: Type: text/plain, Size: 387 bytes --]

Add trace point for queryfs (statfs)

In debugging a recent performance problem with statfs, it would have
been helpful to be able to trace the smb3 query fs info request
more narrowly.  Add a trace point "smb3_qfs_done"

Which displays:

     stat-68950   [008] .....  1472.360598: smb3_qfs_done: xid=14
sid=0xaa9765e4 tid=0x95a76f54 unc_name=\\localhost\test rc=0


-- 
Thanks,

Steve

[-- Attachment #2: 0001-smb3-add-trace-point-for-queryfs-statfs.patch --]
[-- Type: text/x-patch, Size: 1558 bytes --]

From 1dc4ecc467888ad98697c269c43c912496e654a0 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Fri, 1 Sep 2023 01:29:17 -0500
Subject: [PATCH] smb3: add trace point for queryfs (statfs)

In debugging a recent performance problem with statfs, it would have
been helpful to be able to trace the smb3 query fs info request
more narrowly.  Add a trace point "smb3_qfs_done"

Which displays:

 stat-68950   [008] .....  1472.360598: smb3_qfs_done: xid=14 sid=0xaa9765e4 tid=0x95a76f54 unc_name=\\localhost\test rc=0

Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/smb/client/smb2ops.c | 1 +
 fs/smb/client/trace.h   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index 0f62bc373ad0..e5d99cfdd31b 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -2681,6 +2681,7 @@ smb2_queryfs(const unsigned int xid, struct cifs_tcon *tcon,
 		smb2_copy_fs_info_to_kstatfs(info, buf);
 
 qfs_exit:
+	trace_smb3_qfs_done(xid, tcon->tid, tcon->ses->Suid, tcon->tree_name, rc);
 	free_rsp_buf(buftype, rsp_iov.iov_base);
 	return rc;
 }
diff --git a/fs/smb/client/trace.h b/fs/smb/client/trace.h
index e671bd16f00c..a7e4755bed0f 100644
--- a/fs/smb/client/trace.h
+++ b/fs/smb/client/trace.h
@@ -691,7 +691,7 @@ DEFINE_EVENT(smb3_tcon_class, smb3_##name,    \
 	TP_ARGS(xid, tid, sesid, unc_name, rc))
 
 DEFINE_SMB3_TCON_EVENT(tcon);
-
+DEFINE_SMB3_TCON_EVENT(qfs_done);
 
 /*
  * For smb2/smb3 open (including create and mkdir) calls
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][SMB3] add dynamic tracepoint for smb3_qfs_done
  2023-09-01  6:35 [PATCH][SMB3] add dynamic tracepoint for smb3_qfs_done Steve French
@ 2023-09-06  7:40 ` Shyam Prasad N
  0 siblings, 0 replies; 2+ messages in thread
From: Shyam Prasad N @ 2023-09-06  7:40 UTC (permalink / raw)
  To: Steve French; +Cc: CIFS, Bharath S M

On Fri, Sep 1, 2023 at 12:06 PM Steve French <smfrench@gmail.com> wrote:
>
> Add trace point for queryfs (statfs)
>
> In debugging a recent performance problem with statfs, it would have
> been helpful to be able to trace the smb3 query fs info request
> more narrowly.  Add a trace point "smb3_qfs_done"
>
> Which displays:
>
>      stat-68950   [008] .....  1472.360598: smb3_qfs_done: xid=14
> sid=0xaa9765e4 tid=0x95a76f54 unc_name=\\localhost\test rc=0
>
>
> --
> Thanks,
>
> Steve

Looks good to me.

-- 
Regards,
Shyam

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-06  7:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-01  6:35 [PATCH][SMB3] add dynamic tracepoint for smb3_qfs_done Steve French
2023-09-06  7:40 ` Shyam Prasad N

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.