Whamcloud - gitweb
LU-641 obdclass: use rwlock for obd_dev_lock
authorJinshan Xiong <jay@whamcloud.com>
Thu, 25 Aug 2011 20:32:02 +0000 (13:32 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 3 Oct 2011 19:07:28 +0000 (15:07 -0400)
commitbef2828d5dbe56fd0a59c2a260794771f89795b8
tree621b3fd532f3de88b986420cdd8034bca6ea2458
parent91a0bc56864b3dcf047e8e7be3e886ef7bc4d0e3
LU-641 obdclass: use rwlock for obd_dev_lock

In target_handle_connect() it grabs obd_dev_lock to find obd_device
by target uuid. This causes lock contention if there are two many connection
requests on the same time. Based on obd_dev_lock is a read-mostly lock, it
is much reasonable to revise it as a rwlock.

Change-Id: I7f936d6182df9e7ed46b8a1b6fb259226188acbc
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1294
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd_class.h
lustre/obdclass/class_obd.c
lustre/obdclass/genops.c
lustre/obdclass/linux/linux-module.c