Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-56 lnet: eliminate a few locking dance in LNet
[fs/lustre-release.git]
/
lnet
/
lnet
/
lib-move.c
diff --git
a/lnet/lnet/lib-move.c
b/lnet/lnet/lib-move.c
index
c760a92
..
96fb6db
100644
(file)
--- a/
lnet/lnet/lib-move.c
+++ b/
lnet/lnet/lib-move.c
@@
-1854,17
+1854,16
@@
lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr, lnet_nid_t from_nid,
return -EPROTO;
}
return -EPROTO;
}
- if (the_lnet.ln_routing) {
- cfs_time_t now = cfs_time_current();
-
- LNET_LOCK();
-
- ni->ni_last_alive = now;
- if (ni->ni_status != NULL &&
- ni->ni_status->ns_status == LNET_NI_STATUS_DOWN)
- ni->ni_status->ns_status = LNET_NI_STATUS_UP;
+ if (the_lnet.ln_routing &&
+ ni->ni_last_alive != cfs_time_current_sec()) {
+ LNET_LOCK();
- LNET_UNLOCK();
+ /* NB: so far here is the only place to set NI status to "up */
+ ni->ni_last_alive = cfs_time_current_sec();
+ if (ni->ni_status != NULL &&
+ ni->ni_status->ns_status == LNET_NI_STATUS_DOWN)
+ ni->ni_status->ns_status = LNET_NI_STATUS_UP;
+ LNET_UNLOCK();
}
/* Regard a bad destination NID as a protocol error. Senders should
}
/* Regard a bad destination NID as a protocol error. Senders should