staging: lustre: at: net AT after connect

Once connected, the previously gathered AT statistics is not valid
anymore because may reflect other routing, etc. The connect by itself
could take a long time due to different reasons (e.g. server was not
ready) and net latency got very high (see import_select_connection())
what does not reflect the current situation.

Take into account only the current (re-)CONNECT rpc latency.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5380
Xyratex-bug-id: MRP-1285
Reviewed-on: http://review.whamcloud.com/11155
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alexander Boyko 2016-09-18 16:37:58 -04:00 committed by Greg Kroah-Hartman
parent 17be217056
commit 60873bb885
3 changed files with 12 additions and 2 deletions

View File

@ -283,7 +283,7 @@ int ptlrpc_at_get_net_latency(struct ptlrpc_request *req)
}
/* Adjust expected network latency */
static void ptlrpc_at_adj_net_latency(struct ptlrpc_request *req,
void ptlrpc_at_adj_net_latency(struct ptlrpc_request *req,
unsigned int service_time)
{
unsigned int nl, oldnl;

View File

@ -846,6 +846,14 @@ static int ptlrpc_connect_interpret(const struct lu_env *env,
imp->imp_obd->obd_self_export->exp_connect_data = *ocd;
class_export_put(exp);
/*
* The net statistics after (re-)connect is not valid anymore,
* because may reflect other routing, etc.
*/
at_init(&imp->imp_at.iat_net_latency, 0, 0);
ptlrpc_at_adj_net_latency(request,
lustre_msg_get_service_time(request->rq_repmsg));
obd_import_event(imp->imp_obd, imp, IMP_EVENT_OCD);
if (aa->pcaa_initial_connect) {

View File

@ -53,6 +53,8 @@ int ptlrpc_start_thread(struct ptlrpc_service_part *svcpt, int wait);
int ptlrpcd_start(struct ptlrpcd_ctl *pc);
/* client.c */
void ptlrpc_at_adj_net_latency(struct ptlrpc_request *req,
unsigned int service_time);
struct ptlrpc_bulk_desc *ptlrpc_new_bulk(unsigned npages, unsigned max_brw,
unsigned type, unsigned portal);
int ptlrpc_request_cache_init(void);