Whamcloud - gitweb
LU-56 lnet: Granulate LNet lock
authorLiang Zhen <liang@whamcloud.com>
Thu, 7 Jun 2012 08:43:29 +0000 (16:43 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 25 Jun 2012 14:55:03 +0000 (10:55 -0400)
commitc7bff5640caff778d4cfca229672a2cc67b350d6
treedd1ddafd5b5f4670ac07bf32887a5613d97ab9cd
parent790ac5c12fa977d8663317bb9a1de41bb6e2e044
LU-56 lnet: Granulate LNet lock

LNet is using a global lock LNET_LOCK to serialize all operations
and event callbacks of LNet, it's a big performance issue on fat
SMP machines because of high lock contention.

We have submitted many changes to separate critical logic of LNet
and this patch is the key step for finer-grained LNet locking.
This patch add a new lock "lnet_res_lock", all operations on LNet
resources (ME, MD, EQ) are under protection of this lock, we still
keep LNET_LOCK so far, but it's only called for serializing
operations on NI, peer, credits and routers.

This is still an intermediate patch for LNet SMP improvements, both
LNET_LOCK and lnet_res_lock are just spinlock now, they will be
replaced by percpt lock in upcoming patches.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I313caffd21776ee3474c2a1391ea78f002b47790
Reviewed-on: http://review.whamcloud.com/3056
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lnet/include/lnet/lib-types.h
lnet/lnet/api-ni.c
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
lnet/lnet/lib-ptl.c
lnet/lnet/router.c