ocfs2/cluster: Replace timeval with ktime in struct o2net_send_tracking
Replace time trackers in struct o2net_send_tracking from struct timeval to union ktime. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
This commit is contained in:
parent
8757241e32
commit
3f9c14fab0
|
@ -123,10 +123,17 @@ static void *nst_seq_next(struct seq_file *seq, void *v, loff_t *pos)
|
||||||
static int nst_seq_show(struct seq_file *seq, void *v)
|
static int nst_seq_show(struct seq_file *seq, void *v)
|
||||||
{
|
{
|
||||||
struct o2net_send_tracking *nst, *dummy_nst = seq->private;
|
struct o2net_send_tracking *nst, *dummy_nst = seq->private;
|
||||||
|
ktime_t now;
|
||||||
|
s64 sock, send, status;
|
||||||
|
|
||||||
spin_lock(&o2net_debug_lock);
|
spin_lock(&o2net_debug_lock);
|
||||||
nst = next_nst(dummy_nst);
|
nst = next_nst(dummy_nst);
|
||||||
|
|
||||||
|
now = ktime_get();
|
||||||
|
sock = ktime_to_us(ktime_sub(now, nst->st_sock_time));
|
||||||
|
send = ktime_to_us(ktime_sub(now, nst->st_send_time));
|
||||||
|
status = ktime_to_us(ktime_sub(now, nst->st_status_time));
|
||||||
|
|
||||||
if (nst != NULL) {
|
if (nst != NULL) {
|
||||||
/* get_task_comm isn't exported. oh well. */
|
/* get_task_comm isn't exported. oh well. */
|
||||||
seq_printf(seq, "%p:\n"
|
seq_printf(seq, "%p:\n"
|
||||||
|
@ -138,20 +145,17 @@ static int nst_seq_show(struct seq_file *seq, void *v)
|
||||||
" message id: %d\n"
|
" message id: %d\n"
|
||||||
" message type: %u\n"
|
" message type: %u\n"
|
||||||
" message key: 0x%08x\n"
|
" message key: 0x%08x\n"
|
||||||
" sock acquiry: %lu.%ld\n"
|
" sock acquiry: %lld usecs ago\n"
|
||||||
" send start: %lu.%ld\n"
|
" send start: %lld usecs ago\n"
|
||||||
" wait start: %lu.%ld\n",
|
" wait start: %lld usecs ago\n",
|
||||||
nst, (unsigned long)task_pid_nr(nst->st_task),
|
nst, (unsigned long)task_pid_nr(nst->st_task),
|
||||||
(unsigned long)nst->st_task->tgid,
|
(unsigned long)nst->st_task->tgid,
|
||||||
nst->st_task->comm, nst->st_node,
|
nst->st_task->comm, nst->st_node,
|
||||||
nst->st_sc, nst->st_id, nst->st_msg_type,
|
nst->st_sc, nst->st_id, nst->st_msg_type,
|
||||||
nst->st_msg_key,
|
nst->st_msg_key,
|
||||||
nst->st_sock_time.tv_sec,
|
(long long)sock,
|
||||||
(long)nst->st_sock_time.tv_usec,
|
(long long)send,
|
||||||
nst->st_send_time.tv_sec,
|
(long long)status);
|
||||||
(long)nst->st_send_time.tv_usec,
|
|
||||||
nst->st_status_time.tv_sec,
|
|
||||||
(long)nst->st_status_time.tv_usec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock(&o2net_debug_lock);
|
spin_unlock(&o2net_debug_lock);
|
||||||
|
|
|
@ -155,17 +155,17 @@ static void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype,
|
||||||
|
|
||||||
static void o2net_set_nst_sock_time(struct o2net_send_tracking *nst)
|
static void o2net_set_nst_sock_time(struct o2net_send_tracking *nst)
|
||||||
{
|
{
|
||||||
do_gettimeofday(&nst->st_sock_time);
|
nst->st_sock_time = ktime_get();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void o2net_set_nst_send_time(struct o2net_send_tracking *nst)
|
static void o2net_set_nst_send_time(struct o2net_send_tracking *nst)
|
||||||
{
|
{
|
||||||
do_gettimeofday(&nst->st_send_time);
|
nst->st_send_time = ktime_get();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void o2net_set_nst_status_time(struct o2net_send_tracking *nst)
|
static void o2net_set_nst_status_time(struct o2net_send_tracking *nst)
|
||||||
{
|
{
|
||||||
do_gettimeofday(&nst->st_status_time);
|
nst->st_status_time = ktime_get();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void o2net_set_nst_sock_container(struct o2net_send_tracking *nst,
|
static void o2net_set_nst_sock_container(struct o2net_send_tracking *nst,
|
||||||
|
|
|
@ -220,9 +220,9 @@ struct o2net_send_tracking {
|
||||||
u32 st_msg_type;
|
u32 st_msg_type;
|
||||||
u32 st_msg_key;
|
u32 st_msg_key;
|
||||||
u8 st_node;
|
u8 st_node;
|
||||||
struct timeval st_sock_time;
|
ktime_t st_sock_time;
|
||||||
struct timeval st_send_time;
|
ktime_t st_send_time;
|
||||||
struct timeval st_status_time;
|
ktime_t st_status_time;
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
struct o2net_send_tracking {
|
struct o2net_send_tracking {
|
||||||
|
|
Loading…
Reference in New Issue