Whamcloud - gitweb
LU-56 lnet: add lnet_*_free_locked for LNet
authorLiang Zhen <liang@whamcloud.com>
Sat, 26 May 2012 13:56:46 +0000 (21:56 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 5 Jun 2012 19:31:32 +0000 (15:31 -0400)
commit4bd9bf53728260d38efc74cac981318fe31280cd
treef792c0a25bd37292d670278215085ee4c9066f6a
parent54d3582b1f8385d2afaa5b6e9a4bb6b3db8cf154
LU-56 lnet: add lnet_*_free_locked for LNet

LNet has a set of internal functions lnet_*_free to release LNet
message or LNet descriptors (EQ, MD, ME), they require caller to
hold LNET_LOCK on calling, this is somehow confusing because
lnet_*_alloc should be called w/o any lock.
This patch add another set of functions named as lnet_*_free_locked
to replace original lnet_*_free which require caller to hold lock,
and still provide lnet_*_free which can be called w/o any lock.

This patch is just the first step work for LNet SMP improvements.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I4686d83fc08695f117bf6b3b53d5ad56fb03bcd1
Reviewed-on: http://review.whamcloud.com/2919
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lnet/include/lnet/lib-lnet.h
lnet/lnet/lib-eq.c
lnet/lnet/lib-md.c
lnet/lnet/lib-me.c
lnet/lnet/lib-move.c
lnet/lnet/lib-msg.c