Whamcloud - gitweb
LU-12686 lnet: change ln_mt_waitq to a completion. 74/35874/2
authorMr NeilBrown <neilb@suse.com>
Thu, 22 Aug 2019 04:58:12 +0000 (14:58 +1000)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Sep 2019 23:04:51 +0000 (23:04 +0000)
commitb81bcc6c6f0c54c48e908eccb13adc620582881e
treec687373f8cb18ef0436586e8b659988b8a752b2e
parentd7bb6647cd4dd26949bceb6a099cd606623aff2b
LU-12686 lnet: change ln_mt_waitq to a completion.

ln_mt_waitq is only waited on by a call to
  wait_event_interruptible_timeout(..., false, timeout);

As 'false' is never 'true', this will always wait for the full
timeout to expire.  So the waitq is effectively pointless.

To acheive the apparent intent of the waitq, change it to a
completion.  The completion adds a 'done' flag to a waitq so we can
wait until a timeout or until a wakeup is requested.

With this, a longer timeout would could be used, but that is left to
a later patch.

Signed-off-by: Mr NeilBrown <neilb@suse.com>
Change-Id: I10df4b33ee59f579b965e44c022175b8ab007626
Reviewed-on: https://review.whamcloud.com/35874
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-types.h
lnet/lnet/api-ni.c
lnet/lnet/lib-move.c
lnet/lnet/lib-msg.c
lnet/lnet/router.c