Whamcloud - gitweb
LU-56 lnet: new internal object lnet_peer_table
authorLiang Zhen <liang@whamcloud.com>
Sun, 27 May 2012 09:34:00 +0000 (17:34 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 11 Jun 2012 13:06:19 +0000 (09:06 -0400)
commit3211f6862cbbe96642db540e6593f3c614f9528c
tree8c506c8dee1e7cc4f8cae5dd4b730525bafa3f81
parent7a51ad347960ef2b9d1dfad14644c0bca35b80b6
LU-56 lnet: new internal object lnet_peer_table

Instead of attaching all peers under the big global data of LNet, we
created lnet_peer_table which is just a simple container of peers.

We also made another small change in this patch, when the last
refcount of a peer is released, the dead peer wouldn't be released
anymore, instead it will be attached on deathrow list of peer-table
and released while destroying the peer-table. Peers on deathrow list
can be re-used if we need create a new peer.

Both changes in this patch are just preparations for other LNet SMP
improvements. For example, we will create instances of
lnet_peer_table for each CPT in following patches.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I60e6f2e564f9ab9c86278c9a08e24aaac114e89c
Reviewed-on: http://review.whamcloud.com/2923
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
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/lnet/api-ni.c
lnet/lnet/peer.c
lnet/lnet/router_proc.c