mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
Cleanup: there's no point to count on_free latency, because those places are behind scst_update_lat_stats()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4793 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2177,7 +2177,7 @@ struct scst_cmd {
|
||||
uint64_t start, curr_start, parse_time, alloc_buf_time;
|
||||
uint64_t restart_waiting_time, rdy_to_xfer_time;
|
||||
uint64_t pre_exec_time, exec_time, dev_done_time;
|
||||
uint64_t xmit_time, tgt_on_free_time, dev_on_free_time;
|
||||
uint64_t xmit_time;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCST_DEBUG_TM
|
||||
|
||||
@@ -5391,9 +5391,7 @@ static void scst_destroy_cmd(struct scst_cmd *cmd)
|
||||
|
||||
if ((cmd->tgtt->on_free_cmd != NULL) && likely(!cmd->internal)) {
|
||||
TRACE_DBG("Calling target's on_free_cmd(%p)", cmd);
|
||||
scst_set_cur_start(cmd);
|
||||
cmd->tgtt->on_free_cmd(cmd);
|
||||
scst_set_tgt_on_free_time(cmd);
|
||||
TRACE_DBG("%s", "Target's on_free_cmd() returned");
|
||||
}
|
||||
|
||||
@@ -5434,9 +5432,7 @@ void scst_free_cmd(struct scst_cmd *cmd)
|
||||
if (devt->on_free_cmd != NULL) {
|
||||
TRACE_DBG("Calling dev handler %s on_free_cmd(%p)",
|
||||
devt->name, cmd);
|
||||
scst_set_cur_start(cmd);
|
||||
devt->on_free_cmd(cmd);
|
||||
scst_set_dev_on_free_time(cmd);
|
||||
TRACE_DBG("Dev handler %s on_free_cmd() returned",
|
||||
devt->name);
|
||||
}
|
||||
@@ -9539,18 +9535,6 @@ void scst_set_xmit_time(struct scst_cmd *cmd)
|
||||
TRACE_DBG("cmd %p: xmit_time %lld", cmd, cmd->xmit_time);
|
||||
}
|
||||
|
||||
void scst_set_tgt_on_free_time(struct scst_cmd *cmd)
|
||||
{
|
||||
cmd->tgt_on_free_time += scst_get_nsec() - cmd->curr_start;
|
||||
TRACE_DBG("cmd %p: tgt_on_free_time %lld", cmd, cmd->tgt_on_free_time);
|
||||
}
|
||||
|
||||
void scst_set_dev_on_free_time(struct scst_cmd *cmd)
|
||||
{
|
||||
cmd->dev_on_free_time += scst_get_nsec() - cmd->curr_start;
|
||||
TRACE_DBG("cmd %p: dev_on_free_time %lld", cmd, cmd->dev_on_free_time);
|
||||
}
|
||||
|
||||
void scst_update_lat_stats(struct scst_cmd *cmd)
|
||||
{
|
||||
uint64_t finish, scst_time, tgt_time, dev_time;
|
||||
@@ -9582,13 +9566,10 @@ void scst_update_lat_stats(struct scst_cmd *cmd)
|
||||
scst_time = finish - cmd->start - (cmd->parse_time +
|
||||
cmd->alloc_buf_time + cmd->restart_waiting_time +
|
||||
cmd->rdy_to_xfer_time + cmd->pre_exec_time +
|
||||
cmd->exec_time + cmd->dev_done_time + cmd->xmit_time +
|
||||
cmd->tgt_on_free_time + cmd->dev_on_free_time);
|
||||
cmd->exec_time + cmd->dev_done_time + cmd->xmit_time);
|
||||
tgt_time = cmd->alloc_buf_time + cmd->restart_waiting_time +
|
||||
cmd->rdy_to_xfer_time + cmd->pre_exec_time +
|
||||
cmd->xmit_time + cmd->tgt_on_free_time;
|
||||
dev_time = cmd->parse_time + cmd->exec_time + cmd->dev_done_time +
|
||||
cmd->dev_on_free_time;
|
||||
cmd->rdy_to_xfer_time + cmd->pre_exec_time;
|
||||
dev_time = cmd->parse_time + cmd->exec_time + cmd->dev_done_time;
|
||||
|
||||
spin_lock_bh(&sess->lat_lock);
|
||||
|
||||
|
||||
@@ -758,8 +758,6 @@ void scst_set_pre_exec_time(struct scst_cmd *cmd);
|
||||
void scst_set_exec_time(struct scst_cmd *cmd);
|
||||
void scst_set_dev_done_time(struct scst_cmd *cmd);
|
||||
void scst_set_xmit_time(struct scst_cmd *cmd);
|
||||
void scst_set_tgt_on_free_time(struct scst_cmd *cmd);
|
||||
void scst_set_dev_on_free_time(struct scst_cmd *cmd);
|
||||
void scst_update_lat_stats(struct scst_cmd *cmd);
|
||||
|
||||
#else
|
||||
@@ -774,8 +772,6 @@ static inline void scst_set_pre_exec_time(struct scst_cmd *cmd) {}
|
||||
static inline void scst_set_exec_time(struct scst_cmd *cmd) {}
|
||||
static inline void scst_set_dev_done_time(struct scst_cmd *cmd) {}
|
||||
static inline void scst_set_xmit_time(struct scst_cmd *cmd) {}
|
||||
static inline void scst_set_tgt_on_free_time(struct scst_cmd *cmd) {}
|
||||
static inline void scst_set_dev_on_free_time(struct scst_cmd *cmd) {}
|
||||
static inline void scst_update_lat_stats(struct scst_cmd *cmd) {}
|
||||
|
||||
#endif /* CONFIG_SCST_MEASURE_LATENCY */
|
||||
|
||||
Reference in New Issue
Block a user