void
kgnilnd_peer_alive(kgn_peer_t *peer)
{
- set_mb(peer->gnp_last_alive, jiffies);
+ time64_t now = ktime_get_seconds();
+
+ set_mb(peer->gnp_last_alive, now);
}
void
peer_nid = kgnilnd_lnd2lnetnid(net->gnn_ni->ni_nid,
peer->gnp_nid);
- CDEBUG(D_NET, "peer 0x%p->%s last_alive %lu (%lus ago)\n",
+ CDEBUG(D_NET, "peer 0x%p->%s last_alive %lld (%llds ago)\n",
peer, libcfs_nid2str(peer_nid), peer->gnp_last_alive,
- cfs_duration_sec(jiffies - peer->gnp_last_alive));
+ ktime_get_seconds() - peer->gnp_last_alive);
lnet_notify(net->gnn_ni, peer_nid, alive,
peer->gnp_last_alive);
short gnp_connecting; /* connection forming */
short gnp_pending_unlink; /* need last conn close to trigger unlink */
int gnp_last_errno; /* last error conn saw */
- unsigned long gnp_last_alive; /* last time I had valid comms */
+ time64_t gnp_last_alive; /* last time I had valid comms */
int gnp_last_dgram_errno; /* last error dgrams saw */
unsigned long gnp_last_dgram_time; /* last time I tried to connect */
unsigned long gnp_reconnect_time; /* get_seconds() when reconnect OK */
write_unlock(&kgnilnd_data.kgn_peer_conn_lock);
/* Notify LNET that we now have a working connection to this peer.
- * This is a Cray extension to the "standard" LND behavior. */
- lnet_notify(peer->gnp_net->gnn_ni, peer->gnp_nid,
- 1, cfs_time_current());
+ * This is a Cray extension to the "standard" LND behavior.
+ */
+ lnet_notify(peer->gnp_net->gnn_ni, peer->gnp_nid, 1,
+ ktime_get_seconds());
/* drop our 'hold' ref */
kgnilnd_conn_decref(conn);
read_unlock(&kgnilnd_data.kgn_peer_conn_lock);
- seq_printf(s, "%p->%s [%d] %s NIC 0x%x q %d conn %c purg %d last %d@%dms dgram %d@%dms reconn %dms to %lus \n",
+ seq_printf(s, "%p->%s [%d] %s NIC 0x%x q %d conn %c purg %d last %d@%lldms dgram %d@%dms reconn %dms to %lus \n",
peer, libcfs_nid2str(peer->gnp_nid),
atomic_read(&peer->gnp_refcount),
(peer->gnp_state == GNILND_PEER_DOWN) ? "down" :
conn_str,
purg_count,
peer->gnp_last_errno,
- jiffies_to_msecs(jiffies - peer->gnp_last_alive),
+ (ktime_get_seconds() - peer->gnp_last_alive) * MSEC_PER_SEC,
peer->gnp_last_dgram_errno,
jiffies_to_msecs(jiffies - peer->gnp_last_dgram_time),
peer->gnp_reconnect_interval != 0
if (notify)
lnet_notify(peer_ni->ksnp_ni, peer_ni->ksnp_id.nid, 0,
- cfs_time_seconds(last_alive)); /* to jiffies */
+ last_alive);
}
void
case IOC_LIBCFS_NOTIFY_ROUTER: {
time64_t deadline = ktime_get_real_seconds() - data->ioc_u64[0];
+ /* The deadline passed in by the user should be some time in
+ * seconds in the future since the UNIX epoch. We have to map
+ * that deadline to the wall clock.
+ */
+ deadline += ktime_get_seconds();
return lnet_notify(NULL, data->ioc_nid, data->ioc_flags,
deadline);
}