From patchwork Thu Feb 27 21:09:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11409869 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9F1BA138D for ; Thu, 27 Feb 2020 21:24:27 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8795B246A0 for ; Thu, 27 Feb 2020 21:24:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8795B246A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lustre-devel-bounces@lists.lustre.org Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 0E897348C45; Thu, 27 Feb 2020 13:22:12 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp3.ccs.ornl.gov (smtp3.ccs.ornl.gov [160.91.203.39]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id C55B921FA6E for ; Thu, 27 Feb 2020 13:18:49 -0800 (PST) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp3.ccs.ornl.gov (Postfix) with ESMTP id 854771031; Thu, 27 Feb 2020 16:18:14 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 83AD946D; Thu, 27 Feb 2020 16:18:14 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Thu, 27 Feb 2020 16:09:37 -0500 Message-Id: <1582838290-17243-110-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> References: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 109/622] lnet: update logging X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amir Shehata , Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Amir Shehata Add the retry count when logging message sending/resending. Make timed out responses visible on net error. Log cases when a message is not resent WC-bug-id: https://jira.whamcloud.com/browse/LU-11273 Lustre-commit: b9523f474346 ("LU-11273 lnet: update logging") Signed-off-by: Amir Shehata Reviewed-on: https://review.whamcloud.com/33044 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Sonia Sharma Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- net/lnet/lnet/lib-move.c | 13 +++++++------ net/lnet/lnet/lib-msg.c | 21 ++++++++++++++++++--- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/net/lnet/lnet/lib-move.c b/net/lnet/lnet/lib-move.c index 3cab970..84a30e0 100644 --- a/net/lnet/lnet/lib-move.c +++ b/net/lnet/lnet/lib-move.c @@ -1517,14 +1517,14 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats, rc = lnet_post_send_locked(msg, 0); if (!rc) - CDEBUG(D_NET, "TRACE: %s(%s:%s) -> %s(%s:%s) : %s\n", + CDEBUG(D_NET, "TRACE: %s(%s:%s) -> %s(%s:%s) : %s try# %d\n", libcfs_nid2str(msg->msg_hdr.src_nid), libcfs_nid2str(msg->msg_txni->ni_nid), libcfs_nid2str(sd->sd_src_nid), libcfs_nid2str(msg->msg_hdr.dest_nid), libcfs_nid2str(sd->sd_dst_nid), libcfs_nid2str(msg->msg_txpeer->lpni_nid), - lnet_msgtyp2str(msg->msg_type)); + lnet_msgtyp2str(msg->msg_type), msg->msg_retry_count); return rc; } @@ -2515,8 +2515,7 @@ struct lnet_mt_event_info { list_del_init(&rspt->rspt_on_list); - CDEBUG(D_NET, - "Response timed out: md = %p\n", md); + CNETERR("Response timed out: md = %p\n", md); LNetMDUnlink(rspt->rspt_mdh); lnet_rspt_free(rspt, i); } else { @@ -2579,11 +2578,13 @@ struct lnet_mt_event_info { lnet_peer_ni_decref_locked(lpni); lnet_net_unlock(cpt); - CDEBUG(D_NET, "resending %s->%s: %s recovery %d\n", + CDEBUG(D_NET, + "resending %s->%s: %s recovery %d try# %d\n", libcfs_nid2str(src_nid), libcfs_id2str(msg->msg_target), lnet_msgtyp2str(msg->msg_type), - msg->msg_recovery); + msg->msg_recovery, + msg->msg_retry_count); rc = lnet_send(src_nid, msg, LNET_NID_ANY); if (rc) { CERROR("Error sending %s to %s: %d\n", diff --git a/net/lnet/lnet/lib-msg.c b/net/lnet/lnet/lib-msg.c index 5072238..9b52549 100644 --- a/net/lnet/lnet/lib-msg.c +++ b/net/lnet/lnet/lib-msg.c @@ -690,18 +690,33 @@ resend: /* don't resend recovery messages */ - if (msg->msg_recovery) + if (msg->msg_recovery) { + CDEBUG(D_NET, "msg %s->%s is a recovery ping. retry# %d\n", + libcfs_nid2str(msg->msg_from), + libcfs_nid2str(msg->msg_target.nid), + msg->msg_retry_count); return -1; + } /* if we explicitly indicated we don't want to resend then just * return */ - if (msg->msg_no_resend) + if (msg->msg_no_resend) { + CDEBUG(D_NET, "msg %s->%s requested no resend. retry# %d\n", + libcfs_nid2str(msg->msg_from), + libcfs_nid2str(msg->msg_target.nid), + msg->msg_retry_count); return -1; + } /* check if the message has exceeded the number of retries */ - if (msg->msg_retry_count >= lnet_retry_count) + if (msg->msg_retry_count >= lnet_retry_count) { + CNETERR("msg %s->%s exceeded retry count %d\n", + libcfs_nid2str(msg->msg_from), + libcfs_nid2str(msg->msg_target.nid), + msg->msg_retry_count); return -1; + } msg->msg_retry_count++; lnet_net_lock(msg->msg_tx_cpt);