From: Olga Kornievskaia <olga.kornievskaia@gmail.com>
To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH v3 1/6] SUNRPC keep track of number of transports to unique addresses
Date: Tue, 15 Jun 2021 21:10:08 -0400 [thread overview]
Message-ID: <20210616011013.50547-2-olga.kornievskaia@gmail.com> (raw)
In-Reply-To: <20210616011013.50547-1-olga.kornievskaia@gmail.com>
From: Olga Kornievskaia <kolga@netapp.com>
Currently, xprt_switch keeps a number of all xprts (xps_nxprts)
that were added to the switch regardless of whethere it's an
nconnect transport or a transport to a trunkable address.
Introduce a new counter to keep track of transports to unique
destination addresses per xprt_switch.
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
include/linux/sunrpc/xprtmultipath.h | 1 +
net/sunrpc/clnt.c | 2 +-
net/sunrpc/xprtmultipath.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/sunrpc/xprtmultipath.h b/include/linux/sunrpc/xprtmultipath.h
index b19addc8b715..bbb8a5fa0816 100644
--- a/include/linux/sunrpc/xprtmultipath.h
+++ b/include/linux/sunrpc/xprtmultipath.h
@@ -18,6 +18,7 @@ struct rpc_xprt_switch {
unsigned int xps_id;
unsigned int xps_nxprts;
unsigned int xps_nactive;
+ unsigned int xps_nunique_destaddr_xprts;
atomic_long_t xps_queuelen;
struct list_head xps_xprt_list;
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 9bf820bad84c..e6801a481d02 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -2761,7 +2761,7 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt,
task = rpc_call_null_helper(clnt, xprt, NULL, RPC_TASK_ASYNC,
&rpc_cb_add_xprt_call_ops, data);
-
+ data->xps->xps_nunique_destaddr_xprts++;
rpc_put_task(task);
success:
return 1;
diff --git a/net/sunrpc/xprtmultipath.c b/net/sunrpc/xprtmultipath.c
index 07e76ae1028a..584349c8cad4 100644
--- a/net/sunrpc/xprtmultipath.c
+++ b/net/sunrpc/xprtmultipath.c
@@ -138,6 +138,7 @@ struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt,
xps->xps_iter_ops = &rpc_xprt_iter_singular;
rpc_sysfs_xprt_switch_setup(xps, xprt, gfp_flags);
xprt_switch_add_xprt_locked(xps, xprt);
+ xps->xps_nunique_destaddr_xprts = 1;
rpc_sysfs_xprt_setup(xps, xprt, gfp_flags);
}
--
2.27.0
next prev parent reply other threads:[~2021-06-16 1:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-16 1:10 [PATCH v3 0/6] do not collapse trunkable transports Olga Kornievskaia
2021-06-16 1:10 ` Olga Kornievskaia [this message]
2021-06-16 1:10 ` [PATCH v3 2/6] SUNRPC add xps_nunique_destaddr_xprts to xprt_switch_info in sysfs Olga Kornievskaia
2021-06-16 1:10 ` [PATCH v3 3/6] NFSv4 introduce max_connect mount options Olga Kornievskaia
2021-06-16 1:10 ` [PATCH v3 4/6] SUNRPC enforce creation of no more than max_connect xprts Olga Kornievskaia
2021-06-16 1:10 ` [PATCH v3 5/6] NFSv4 add network transport when session trunking is detected Olga Kornievskaia
2021-06-16 1:10 ` [PATCH v3 6/6] NFSv4 allow for nconnect value of trunkable transport Olga Kornievskaia
2021-08-06 20:12 ` Olga Kornievskaia
2021-07-09 14:24 ` [PATCH v3 0/6] do not collapse trunkable transports Olga Kornievskaia
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=20210616011013.50547-2-olga.kornievskaia@gmail.com \
--to=olga.kornievskaia@gmail.com \
--cc=anna.schumaker@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/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 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.