Whamcloud - gitweb
LU-12739 lnet: Don't queue msg when discovery has completed 39/36139/3
authorChris Horn <hornc@cray.com>
Mon, 9 Sep 2019 17:54:08 +0000 (12:54 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 27 Sep 2019 23:12:25 +0000 (23:12 +0000)
commit4ef62976448d6821df9aab3e720fd8d9d0bdefce
tree81ded1be9e81b241624a106d996b97fec7e65849
parentd8135ad2fbe58a0fbe6984584816338542901c5c
LU-12739 lnet: Don't queue msg when discovery has completed

In lnet_initiate_peer_discovery(), it is possible for the peer object
to change after the call to lnet_discover_peer_locked(), and it is
also possible for the peer to complete discovery between the first
call to lnet_peer_is_uptodate() and our placing the lnet_msg onto
the peer's lp_dc_pendq. After the call to lnet_discover_peer_locked()
check whether the, potentially new, peer object is up to date while
holding the lp_lock. If the peer is up to date, then we needn't
queue the message. Otherwise, we continue to hold the lock to place
the message on the peer's lp_dc_pendq.

Cray-bug-id: LUS-7596
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: Ib3da7447588479bb35afcc3fe176b9120d915a89
Reviewed-on: https://review.whamcloud.com/36139
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lnet/lnet/lib-move.c
lnet/lnet/peer.c