Whamcloud - gitweb
LU-56 lnet: Partitioned LNet resources (ME/MD/EQ)
authorLiang Zhen <liang@whamcloud.com>
Mon, 11 Jun 2012 14:28:23 +0000 (22:28 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 26 Jun 2012 16:09:48 +0000 (12:09 -0400)
commit279bbc81e03dc74d273ec12b4d9e703ca94404c4
tree442524ffd53f123e37b0ce0760177eb0e3b4caed
parent582c110231cf06bcd7e5e0b3bdf4f2058e18ebe4
LU-56 lnet: Partitioned LNet resources (ME/MD/EQ)

We already have a new lock lnet_res_lock to protect LNet resources,
but it's still a global lock and could have performance issue.
This patch created partitioned data for LNet, resources are
spreaded into different partitions. Also, lnet_res_lock is not
a single spinlock anymore, it's a percpt lock now, which means
LNet only needs to lock one partition at a time while operating
MD/ME belonging to that partition.

There are a few things are still serialized by exclusive lock:
- EQ allocation/free
- LNetEQPoll (non-zero size EQ)
- delay message on lazy portal
- Steaing MD between partitions.

There operations are either rare or deprecated so they shouldn't
become performance problem.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: If5e88b92dd508b84c0fd91725b3aaed424dd3108
Reviewed-on: http://review.whamcloud.com/3078
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lnet/include/lnet/lib-types.h
lnet/include/lnet/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