Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 229008
b: refs/heads/master
c: 3c193b3
h: refs/heads/master
v: v3
  • Loading branch information
Sunil Mushran authored and Joel Becker committed Dec 23, 2010
1 parent bd9ee09 commit ead0b62
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff1becbf85bf4d4d4652915b7ab27db949585f6b
refs/heads/master: 3c193b3807e933cf2a16d55a38debbe549195847
24 changes: 24 additions & 0 deletions trunk/fs/ocfs2/cluster/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,28 @@ static inline void o2net_set_func_stop_time(struct o2net_sock_container *sc)
# define o2net_set_func_stop_time(a)
#endif /* CONFIG_DEBUG_FS */

#ifdef CONFIG_OCFS2_FS_STATS
static void o2net_update_send_stats(struct o2net_send_tracking *nst,
struct o2net_sock_container *sc)
{
sc->sc_tv_status_total = ktime_add(sc->sc_tv_status_total,
ktime_sub(ktime_get(),
nst->st_status_time));
sc->sc_tv_send_total = ktime_add(sc->sc_tv_send_total,
ktime_sub(nst->st_status_time,
nst->st_send_time));
sc->sc_tv_acquiry_total = ktime_add(sc->sc_tv_acquiry_total,
ktime_sub(nst->st_send_time,
nst->st_sock_time));
sc->sc_send_count++;
}

#else

# define o2net_update_send_stats(a, b)

#endif /* CONFIG_OCFS2_FS_STATS */

static inline int o2net_reconnect_delay(void)
{
return o2nm_single_cluster->cl_reconnect_delay_ms;
Expand Down Expand Up @@ -1093,6 +1115,8 @@ int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *caller_vec,
o2net_set_nst_status_time(&nst);
wait_event(nsw.ns_wq, o2net_nsw_completed(nn, &nsw));

o2net_update_send_stats(&nst, sc);

/* Note that we avoid overwriting the callers status return
* variable if a system error was reported on the other
* side. Callers beware. */
Expand Down
6 changes: 6 additions & 0 deletions trunk/fs/ocfs2/cluster/tcp_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ struct o2net_sock_container {
ktime_t sc_tv_advance_stop;
ktime_t sc_tv_func_start;
ktime_t sc_tv_func_stop;
#endif
#ifdef CONFIG_OCFS2_FS_STATS
ktime_t sc_tv_acquiry_total;
ktime_t sc_tv_send_total;
ktime_t sc_tv_status_total;
u32 sc_send_count;
#endif
struct mutex sc_send_lock;
};
Expand Down

0 comments on commit ead0b62

Please sign in to comment.