Whamcloud - gitweb
LU-56 obdclass: SMP improvement for lu_key
authorLiang Zhen <liang@whamcloud.com>
Thu, 17 May 2012 06:47:15 +0000 (14:47 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 28 Jun 2012 03:37:30 +0000 (23:37 -0400)
commit8a5b8dbda960b155f669c13602504f1233a84c7e
tree29e394ec2f1aaa9d2d2da97c34113aa5fcd01556
parente531dc437c56a08a65de9074a511faa55184712b
LU-56 obdclass: SMP improvement for lu_key

ptlrpc service threads need to call lu_context_init/fini in each
loop (for each RPC), this could be a big performance issue on
fat SMP machine if we always add lu_context to remember list
because operations on lu_context with LCT_REMEMBER are serialized
by one spinlock and we need to lock/unlock it for multiple times
for each RPC.

But we found LCT_REMEMBER is abused at here, it's impossible that
server stack is being unloaded but service threads are still
running, so we can simply remove LCT_REMEMBER flag from ->rq_session,
and made some small changes to bypass global lock in lu_context_init
and lu_context_fini if w/o LCT_REMEMBER.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5875a90365a103707526483047ec7628f6964a56
Reviewed-on: http://review.whamcloud.com/2824
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/lu_object.c
lustre/ptlrpc/service.c