summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/host.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-07-30 02:17:10 +0200
committerJames Bottomley <JBottomley@Parallels.com>2011-08-24 05:04:42 +0200
commit9b4be528999483d70a1ffc0accd102e477d5a503 (patch)
tree9b868ca20a761b20af3ba79a168b42acb109922f /drivers/scsi/isci/host.h
parent[SCSI] isci: Leave requests alone if already terminating. (diff)
downloadlinux-9b4be528999483d70a1ffc0accd102e477d5a503.tar.xz
linux-9b4be528999483d70a1ffc0accd102e477d5a503.zip
[SCSI] isci: dynamic interrupt coalescing
Hardware allows both an outstanding number commands and a timeout value (whichever occurs first) as a gate to the next interrupt generation. This scheme at completion time looks at the remaining number of outstanding tasks and sets the timeout to maximize small transaction operation. If transactions are large (take more than a few 10s of microseconds to complete) then performance is not interrupt processing bound, so the small timeouts this scheme generates are overridden by the time it takes for a completion to arrive. Tested-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/isci/host.h')
-rw-r--r--drivers/scsi/isci/host.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h
index 062101a39f79..9f33831a2f04 100644
--- a/drivers/scsi/isci/host.h
+++ b/drivers/scsi/isci/host.h
@@ -369,6 +369,9 @@ static inline struct isci_host *dev_to_ihost(struct domain_device *dev)
#define ISCI_TAG_SEQ(tag) (((tag) >> 12) & (SCI_MAX_SEQ-1))
#define ISCI_TAG_TCI(tag) ((tag) & (SCI_MAX_IO_REQUESTS-1))
+/* interrupt coalescing baseline: 9 == 3 to 5us interrupt delay per command */
+#define ISCI_COALESCE_BASE 9
+
/* expander attached sata devices require 3 rnc slots */
static inline int sci_remote_device_node_count(struct isci_remote_device *idev)
{