Whamcloud - gitweb
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>