From: Chuck Lever <chuck.lever@oracle.com>
To: anna.schumaker@netapp.com
Cc: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: [PATCH 1/6] xprtrdma: Fix "bytes registered" accounting
Date: Wed, 03 Jan 2018 15:38:09 -0500 [thread overview]
Message-ID: <20180103203809.29209.43874.stgit@manet.1015granger.net> (raw)
In-Reply-To: <20180103203540.29209.4620.stgit@manet.1015granger.net>
The contents of seg->mr_len changed when ->ro_map stopped returning
the full chunk length in the first segment. Count the full length of
each Write chunk, not the length of the first segment (which now can
only be as large as a page).
Fixes: 9d6b04097882 ("xprtrdma: Place registered MWs on a ... ")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
net/sunrpc/xprtrdma/rpc_rdma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 1ae9b41..162e5dd 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -431,7 +431,7 @@ static bool rpcrdma_results_inline(struct rpcrdma_xprt *r_xprt,
trace_xprtrdma_write_chunk(rqst->rq_task, mr, nsegs);
r_xprt->rx_stats.write_chunk_count++;
- r_xprt->rx_stats.total_rdma_request += seg->mr_len;
+ r_xprt->rx_stats.total_rdma_request += mr->mr_length;
nchunks++;
nsegs -= mr->mr_nents;
} while (nsegs);
@@ -489,7 +489,7 @@ static bool rpcrdma_results_inline(struct rpcrdma_xprt *r_xprt,
trace_xprtrdma_reply_chunk(rqst->rq_task, mr, nsegs);
r_xprt->rx_stats.reply_chunk_count++;
- r_xprt->rx_stats.total_rdma_request += seg->mr_len;
+ r_xprt->rx_stats.total_rdma_request += mr->mr_length;
nchunks++;
nsegs -= mr->mr_nents;
} while (nsegs);
next prev parent reply other threads:[~2018-01-03 20:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 20:38 [PATCH 0/6] Final NFS/RDMA series for v4.16 Chuck Lever
2018-01-03 20:38 ` Chuck Lever [this message]
2018-01-03 20:38 ` [PATCH 2/6] xprtrdma: Correct some documenting comments Chuck Lever
2018-01-03 20:38 ` [PATCH 3/6] SUNRPC: Trace xprt_timer events Chuck Lever
2018-01-03 20:38 ` [PATCH 4/6] sunrpc: Format RPC events consistently for display Chuck Lever
2018-01-03 20:38 ` [PATCH 5/6] SUNRPC: task_run_action should display tk_callback Chuck Lever
2018-01-03 20:38 ` [PATCH 6/6] SUNRPC: Micro-optimize __rpc_execute Chuck Lever
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=20180103203809.29209.43874.stgit@manet.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=anna.schumaker@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-rdma@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).