* [PATCH] Add dynamic trace point for timeouts waiting for credits
@ 2019-03-10 2:31 Steve French
2019-03-11 17:47 ` Pavel Shilovsky
0 siblings, 1 reply; 2+ messages in thread
From: Steve French @ 2019-03-10 2:31 UTC (permalink / raw)
To: CIFS; +Cc: Pavel Shilovsky, ronnie sahlberg
[-- Attachment #1: Type: text/plain, Size: 19 bytes --]
--
Thanks,
Steve
[-- Attachment #2: 0001-smb3-add-dynamic-tracepoint-for-timeout-waiting-for-.patch --]
[-- Type: text/x-patch, Size: 1750 bytes --]
From 0551fe7c680f5a3bb33a5c28d8f713dd562462b9 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Sat, 9 Mar 2019 20:29:55 -0600
Subject: [PATCH] smb3: add dynamic tracepoint for timeout waiting for credits
To help debug credit starvation problems where we timeout
waiting for server to grant the client credits.
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/cifs/trace.h | 1 +
fs/cifs/transport.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/fs/cifs/trace.h b/fs/cifs/trace.h
index d8b049afa606..c78e96c4cc53 100644
--- a/fs/cifs/trace.h
+++ b/fs/cifs/trace.h
@@ -713,6 +713,7 @@ DEFINE_EVENT(smb3_credit_class, smb3_##name, \
TP_ARGS(currmid, hostname, credits))
DEFINE_SMB3_CREDIT_EVENT(reconnect_with_invalid_credits);
+DEFINE_SMB3_CREDIT_EVENT(credit_timeout);
#endif /* _CIFS_TRACE_H */
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index b3d04018195c..8731cfa66026 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -527,6 +527,8 @@ wait_for_free_credits(struct TCP_Server_Info *server, const int num_credits,
has_credits(server, credits, num_credits), t);
cifs_num_waiters_dec(server);
if (!rc) {
+ trace_smb3_credit_timeout(server->CurrentMid,
+ server->hostname, num_credits);
cifs_dbg(VFS, "wait timed out after %d ms\n",
timeout);
return -ENOTSUPP;
@@ -565,6 +567,9 @@ wait_for_free_credits(struct TCP_Server_Info *server, const int num_credits,
t);
cifs_num_waiters_dec(server);
if (!rc) {
+ trace_smb3_credit_timeout(
+ server->CurrentMid,
+ server->hostname, num_credits);
cifs_dbg(VFS, "wait timed out after %d ms\n",
timeout);
return -ENOTSUPP;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Add dynamic trace point for timeouts waiting for credits
2019-03-10 2:31 [PATCH] Add dynamic trace point for timeouts waiting for credits Steve French
@ 2019-03-11 17:47 ` Pavel Shilovsky
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Shilovsky @ 2019-03-11 17:47 UTC (permalink / raw)
To: Steve French; +Cc: CIFS, ronnie sahlberg
Looks good.
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
--
Best regards,
Pavel Shilovsky
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-11 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-10 2:31 [PATCH] Add dynamic trace point for timeouts waiting for credits Steve French
2019-03-11 17:47 ` Pavel Shilovsky
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.