Whamcloud - gitweb
LU-56 ldlm: SMP improvement for ldlm_lock_cancel
authorLiang Zhen <liang@whamcloud.com>
Tue, 19 Jun 2012 14:43:31 +0000 (22:43 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 29 Jun 2012 02:52:37 +0000 (22:52 -0400)
commit7b2ab9beae02080797ff2da5105eaddadd67c151
tree00f2509f5b418d605ec9b38f21c0c4ba2e2f60e4
parentc47d656b7c42115fd83347c7594532c72b9a8326
LU-56 ldlm: SMP improvement for ldlm_lock_cancel

ldlm_del_waiting_lock() is always called twice in ldlm_lock_cancel
even the ldlm_lock is not on expiring waiter list, this is bad for
performance because it needs to grab a global lock and disable
softirq.
This patch add a new bit l_waited to ldlm_lock, it's set only if
ldlm_add_waiting_lock() is ever called, and we can bypass
ldlm_del_waiting_lock() in ldlm_lock_cancel() if w/o this bit.

I also adopted patch(32562) on BZ 20509 because it's necessary for
this improvement.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ie48d527b8da187a88646aa070be3aa4beb304b1d
Reviewed-on: http://review.whamcloud.com/3141
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_dlm.h
lustre/ldlm/l_lock.c
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c