summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorLiang Zhen <liang.zhen@intel.com>2015-03-25 21:53:19 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-26 11:10:24 +0100
commit06fbc01a870eea4431ca340642da7bfd4a5a262e (patch)
treeee32e0402d1398450b0374d0f726537db99ceb41 /drivers/staging/lustre
parentf42894004727ffdfb3b0826b0047eaf44cbdece6 (diff)
downloadop-kernel-dev-06fbc01a870eea4431ca340642da7bfd4a5a262e.zip
op-kernel-dev-06fbc01a870eea4431ca340642da7bfd4a5a262e.tar.gz
staging/lustre/ptlrpc: false alarm in AT network latency measuring
If early reply of client RPC is lost and client RPC is expired and resent, server will drop the resent RPC because it's already in processing, server may also send reply or early reply to client, which can still match reply buffer of the original request. In this case, client is measuring time from resent time, but server is reporting service time of original RPC, which is longer than the time measured by client. Signed-off-by: Liang Zhen <liang.zhen@intel.com> Reviewed-on: http://review.whamcloud.com/12855 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5545 Reviewed-by: Li Wei <wei.g.li@intel.com> Reviewed-by: Johann Lombardi <johann.lombardi@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/client.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c
index 0fe6a64..0357f1d 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/client.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/client.c
@@ -285,14 +285,27 @@ static void ptlrpc_at_adj_net_latency(struct ptlrpc_request *req,
time_t now = get_seconds();
LASSERT(req->rq_import);
- at = &req->rq_import->imp_at;
+
+ if (service_time > now - req->rq_sent + 3) {
+ /* bz16408, however, this can also happen if early reply
+ * is lost and client RPC is expired and resent, early reply
+ * or reply of original RPC can still be fit in reply buffer
+ * of resent RPC, now client is measuring time from the
+ * resent time, but server sent back service time of original
+ * RPC.
+ */
+ CDEBUG((lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT) ?
+ D_ADAPTTO : D_WARNING,
+ "Reported service time %u > total measured time "
+ CFS_DURATION_T"\n", service_time,
+ cfs_time_sub(now, req->rq_sent));
+ return;
+ }
/* Network latency is total time less server processing time */
- nl = max_t(int, now - req->rq_sent - service_time, 0) + 1/*st rounding*/;
- if (service_time > now - req->rq_sent + 3 /* bz16408 */)
- CWARN("Reported service time %u > total measured time "
- CFS_DURATION_T"\n", service_time,
- cfs_time_sub(now, req->rq_sent));
+ nl = max_t(int, now - req->rq_sent -
+ service_time, 0) + 1; /* st rounding */
+ at = &req->rq_import->imp_at;
oldnl = at_measured(&at->iat_net_latency, nl);
if (oldnl != 0)
OpenPOWER on IntegriCloud