Whamcloud - gitweb
LU-56 lnet: parse RC ping in event callback
In current LNet, we don't parse router-checker ping in EQ callback,
NI information from remote side is attached on peer and it's parsed
for each sending. This is OK for now but with upcoming SMP
improvements, the global LNET_LOCK is removed and EQ callback and
peer/router are proteced by different locks, which means sink buffer
of RC ping could be in progressing of change when other thread is
reading it in lnet_send(), and get wrong information.
This patch will parse ping information in EQ callback, and store it
in a new member lnet_route_t::lr_downis which is just a integer,
although reader in lnet_send() still don't have lock while reading
it, but it's OK because it's just an integer and reader can
atomically read reliable result even w/o any lock.
It should also be a little faster than original implememtation
because we don't have to parse RC ping, which should be updated
once for many seconds, for each sending.
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5b89fabfd22f22ba171ef63d30da2d32e2788b16
Reviewed-on: http://review.whamcloud.com/2932
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>