aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tmr.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@daterainc.com>2017-01-19 15:45:57 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2017-02-26 16:21:06 -0800
commitc87ba9c49c1fa86261448b09c5f1b2223bf7efd9 (patch)
treed710dc3220024b8215cb2531fc55a122ebaba07c /drivers/target/target_core_tmr.c
parentiscsi-target: Fix early login failure statistics misses (diff)
downloadlinux-dev-c87ba9c49c1fa86261448b09c5f1b2223bf7efd9.tar.xz
linux-dev-c87ba9c49c1fa86261448b09c5f1b2223bf7efd9.zip
target: Add counters for ABORT_TASK success + failure
This patch introduces two counters for ABORT_TASK success + failure under: /sys/kernel/config/target/core/$HBA/$DEV/statistics/scsi_tgt_dev/ that are useful for diagnosing various backend device latency and front fabric issues. Normally when folks see alot of aborts_complete happening, it means the backend device I/O completion latency is high, and not returning completions fast enough before host side timeouts trigger. And normally when folks see alot of aborts_no_task, it means completions are being posted by target-core into fabric driver code, but the responses aren't making it back to the host. Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_tmr.c')
-rw-r--r--drivers/target/target_core_tmr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
index a806d9bca3d2..dce1e1b47316 100644
--- a/drivers/target/target_core_tmr.c
+++ b/drivers/target/target_core_tmr.c
@@ -190,6 +190,7 @@ void core_tmr_abort_task(
printk("ABORT_TASK: Sending TMR_FUNCTION_COMPLETE for"
" ref_tag: %llu\n", ref_tag);
tmr->response = TMR_FUNCTION_COMPLETE;
+ atomic_long_inc(&dev->aborts_complete);
return;
}
spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
@@ -197,6 +198,7 @@ void core_tmr_abort_task(
printk("ABORT_TASK: Sending TMR_TASK_DOES_NOT_EXIST for ref_tag: %lld\n",
tmr->ref_task_tag);
tmr->response = TMR_TASK_DOES_NOT_EXIST;
+ atomic_long_inc(&dev->aborts_no_task);
}
static void core_tmr_drain_tmr_list(