Whamcloud - gitweb
LU-12565 obdecho: use bit-locking in echo_client. 63/35563/4
authorNeilBrown <neilb@suse.com>
Mon, 22 Jul 2019 03:04:11 +0000 (23:04 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Aug 2019 07:54:33 +0000 (07:54 +0000)
commita0ed8ac61e199993afe28f58801fa0182e69a2f8
treecaedbcfdc831d9041e2ca23ea2c38ccdee0d834c
parentab38b346d9176dce1b02cf631db31998e0170832
LU-12565 obdecho: use bit-locking in echo_client.

The ep_lock used by echo client causes lockdep to complain.
Multiple locks of the same class are taken concurrently which
appear to lockdep to be prone to deadlocking, and can fill up
lockdep's fixed size stack for locks.

As ep_lock is taken on multiple pages always in ascending page order,
deadlocks don't happen, so this is a false-positive.

The function of the ep_lock is the same as thats for page_lock(),
which is implemented as a bit-lock using wait_on_bit().  lockdep
cannot see these locks, and doesn't really need to.

So convert ep_lock to a simple bit-lock using wait_on_bit for
waiting. This provides similar functionality, matches how page_lock()
works, and avoids lockdep problems.

Linux-commit: f017f3ff7eb704ea1fc125a90a39b693ee84bd0a

Change-Id: I97050e1c88ee27ca4e05b4b39a65e1850f42534b
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-on: https://review.whamcloud.com/35563
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdecho/echo_client.c