i=isaac
i=liang
Fix for "prediction from the future" bug. Cleanup of gmlnd and qswlnd to ensure that they use cfs_time_t uniformly.
struct iovec *iov; /* mapped frags */
lnet_kiov_t *kiov; /* page frags */
} tx_large_frags;
struct iovec *iov; /* mapped frags */
lnet_kiov_t *kiov; /* page frags */
} tx_large_frags;
- unsigned long tx_launchtime; /* when (in jiffies) the transmit was launched */
+ cfs_time_t tx_launchtime; /* when (in jiffies) the
+ * transmit was launched */
struct gmnal_tx *tx_next; /* stash on gmni_txs */
} gmnal_tx_t;
struct gmnal_tx *tx_next; /* stash on gmni_txs */
} gmnal_tx_t;
void
gmnal_notify_peer_down(gmnal_tx_t *tx)
{
void
gmnal_notify_peer_down(gmnal_tx_t *tx)
{
- do_gettimeofday (&now);
- then = now.tv_sec - (jiffies - tx->tx_launchtime)/HZ;
-
+ then = cfs_time_current_sec() -
+ cfs_duration_sec(cfs_time_current() -
+ tx->tx_launchtime);
+
lnet_notify(tx->tx_gmni->gmni_ni, tx->tx_nid, 0, then);
}
lnet_notify(tx->tx_gmni->gmni_ni, tx->tx_nid, 0, then);
}
LASSERT(!tx->tx_credit);
tx->tx_credit = 1;
LASSERT(!tx->tx_credit);
tx->tx_credit = 1;
- tx->tx_launchtime = jiffies;
+ tx->tx_launchtime = cfs_time_current();
if (tx->tx_msgnob <= gmni->gmni_small_msgsize) {
LASSERT (tx->tx_ltxb == NULL);
if (tx->tx_msgnob <= gmni->gmni_small_msgsize) {
LASSERT (tx->tx_ltxb == NULL);
lnet_nid_t ktx_nid; /* destination node */
void *ktx_args[3]; /* completion passthru */
char *ktx_buffer; /* pre-allocated contiguous buffer for hdr + small payloads */
lnet_nid_t ktx_nid; /* destination node */
void *ktx_args[3]; /* completion passthru */
char *ktx_buffer; /* pre-allocated contiguous buffer for hdr + small payloads */
- unsigned long ktx_launchtime; /* when (in jiffies) the transmit was launched */
+ cfs_time_t ktx_launchtime; /* when (in jiffies) the transmit
+ * was launched */
int ktx_status; /* completion status */
#if KQSW_CKSUM
__u32 ktx_cksum; /* optimized GET payload checksum */
int ktx_status; /* completion status */
#if KQSW_CKSUM
__u32 ktx_cksum; /* optimized GET payload checksum */
void
kqswnal_notify_peer_down(kqswnal_tx_t *ktx)
{
void
kqswnal_notify_peer_down(kqswnal_tx_t *ktx)
{
- do_gettimeofday (&now);
- then = now.tv_sec - (jiffies - ktx->ktx_launchtime)/HZ;
+ then = cfs_time_current_sec() -
+ cfs_duration_sec(cfs_time_current() -
+ ktx->ktx_launchtime);
lnet_notify(kqswnal_data.kqn_ni, ktx->ktx_nid, 0, then);
}
lnet_notify(kqswnal_data.kqn_ni, ktx->ktx_nid, 0, then);
}
unsigned long flags;
int rc;
unsigned long flags;
int rc;
- ktx->ktx_launchtime = jiffies;
+ ktx->ktx_launchtime = cfs_time_current();
if (kqswnal_data.kqn_shuttingdown)
return (-ESHUTDOWN);
if (kqswnal_data.kqn_shuttingdown)
return (-ESHUTDOWN);
peer->ksnp_accepting == 0 &&
ksocknal_find_connecting_route_locked(peer) == NULL) {
notify = 1;
peer->ksnp_accepting == 0 &&
ksocknal_find_connecting_route_locked(peer) == NULL) {
notify = 1;
- last_alive = cfs_time_seconds(peer->ksnp_last_alive);
+ last_alive = cfs_time_current_sec() -
+ cfs_duration_sec(cfs_time_current() -
+ peer->ksnp_last_alive);
}
read_unlock (&ksocknal_data.ksnd_global_lock);
}
read_unlock (&ksocknal_data.ksnd_global_lock);