Whamcloud - gitweb
LU-14810 lnet: Avoid multiple PUSH to same peer 15/59815/3
authorChris Horn <chris.horn@hpe.com>
Tue, 17 Jun 2025 19:22:48 +0000 (13:22 -0600)
committerOleg Drokin <green@whamcloud.com>
Tue, 8 Jul 2025 03:52:10 +0000 (03:52 +0000)
commit99153d212d8c3c1d58cb088b23224d17eefb0fd7
tree14721d9a903b5ab4f0a7257811f309e1a6935957
parenta202a9b6f758919a7b8b1030ebd1ac52bdf85900
LU-14810 lnet: Avoid multiple PUSH to same peer

It is possible to send multiple PUSHes to the same peer when the
LNET_PEER_FORCE_PUSH bit is set in the peer state. A partial solution
was added in https://review.whamcloud.com/55559/ where we modified
lnet_peer_needs_push() to check for the PUSH_SENT flag. However, we
missed that the main loop in lnet_peer_discovery() will check for the
LNET_PEER_FORCE_PUSH bit prior to calling lnet_peer_needs_push().
Update lnet_peer_discovery() to remove the problematic check for
LNET_PEER_FORCE_PUSH.

Also refactor the checks for sending a ping into a new function,
lnet_peer_needs_ping().

Test-Parameters: trivial
Test-Parameters: testlist=sanity-lnet env=ONLY=212,ONLY_REPEAT=100
Fixes: 72726a3118 ("LU-14810 lnet: Do not issue multiple PUSHes")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ie25089a07ac1d0fcc0e6c56ec69337d22371cc32
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59815
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lnet/lnet/peer.c