Whamcloud - gitweb
ORNL-28: remove lock contention in reconnecting
authorJinshan Xiong <jay@whamcloud.com>
Mon, 19 Sep 2011 02:58:21 +0000 (19:58 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Oct 2011 21:37:19 +0000 (17:37 -0400)
commitb8f31f82420bf055c38b978cf02d14215e95aae3
tree34487166763646689c19acec78824213eb9334f3
parentb05ed4fef2a84f7130ef069e71e93df6155bccb8
ORNL-28: remove lock contention in reconnecting

target_handle_connect() used to grab obd::obd_recovery_task_lock to update
obd_next_recovery_transno and obd_connected_clients. In this patch, I revised
this piece of code by:
- modify obd_connected_clients to cfs_atomic_t
- grab obd_recovery_task_lock only if ocd_transno is less than
  obd_next_recovery_transno

In this way, target_handle_connect() don't grab any global lock.

Change-Id: I971897de82566e239fe750cf95f2c3f1646325bc
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1293
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/include/obd.h
lustre/ldlm/ldlm_lib.c
lustre/obdclass/genops.c
lustre/obdclass/lprocfs_status.c