diff options
author | Mark Haverkamp <markh@osdl.org> | 2005-08-03 18:38:51 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-08-05 17:49:46 -0400 |
commit | bed30de47b034b5f28fb7db2fae4860b9d9c0622 (patch) | |
tree | 1dd29e4f8ae3122d8cc642523a6f0cd2ca70bfd3 /drivers | |
parent | fc789a93994858b5e5a46afb96d0dcf6cc1b6f08 (diff) |
[SCSI] aacraid: interupt mitigation
Received from Mark Salyzyn from Adaptec:
If more than two commands are outstanding to the controller, there is no
need to notify the adapter via a PCI bus transaction of additional
commands added into the queue; it will get to them when it works through
the produce/consumer indexes.
This reduced the PCI traffic in the driver to submit a command to the
queue to near zero allowing a significant number of commands to be
turned around with no need to block for the PCI bridge to flush the
notify request to the adapter.
Interrupt mitigation has always been present in the driver; it was
turned off because of a bug that prevented one from realizing the
usefulness of the feature. This bug is fixed in this patch.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/aacraid/comminit.c | 4 | ||||
-rw-r--r-- | drivers/scsi/aacraid/commsup.c | 20 |
2 files changed, 20 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 43557bf661f6..75abd0453289 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c | |||
@@ -44,7 +44,9 @@ | |||
44 | 44 | ||
45 | #include "aacraid.h" | 45 | #include "aacraid.h" |
46 | 46 | ||
47 | struct aac_common aac_config; | 47 | struct aac_common aac_config = { |
48 | .irq_mod = 1 | ||
49 | }; | ||
48 | 50 | ||
49 | static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long commsize, unsigned long commalign) | 51 | static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long commsize, unsigned long commalign) |
50 | { | 52 | { |
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 5322865942e2..a1d303f03480 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c | |||
@@ -254,6 +254,7 @@ static void fib_dealloc(struct fib * fibptr) | |||
254 | static int aac_get_entry (struct aac_dev * dev, u32 qid, struct aac_entry **entry, u32 * index, unsigned long *nonotify) | 254 | static int aac_get_entry (struct aac_dev * dev, u32 qid, struct aac_entry **entry, u32 * index, unsigned long *nonotify) |
255 | { | 255 | { |
256 | struct aac_queue * q; | 256 | struct aac_queue * q; |
257 | unsigned long idx; | ||
257 | 258 | ||
258 | /* | 259 | /* |
259 | * All of the queues wrap when they reach the end, so we check | 260 | * All of the queues wrap when they reach the end, so we check |
@@ -263,10 +264,23 @@ static int aac_get_entry (struct aac_dev * dev, u32 qid, struct aac_entry **entr | |||
263 | */ | 264 | */ |
264 | 265 | ||
265 | q = &dev->queues->queue[qid]; | 266 | q = &dev->queues->queue[qid]; |
266 | 267 | ||
267 | *index = le32_to_cpu(*(q->headers.producer)); | 268 | idx = *index = le32_to_cpu(*(q->headers.producer)); |
268 | if ((*index - 2) == le32_to_cpu(*(q->headers.consumer))) | 269 | /* Interrupt Moderation, only interrupt for first two entries */ |
270 | if (idx != le32_to_cpu(*(q->headers.consumer))) { | ||
271 | if (--idx == 0) { | ||
272 | if (qid == AdapHighCmdQueue) | ||
273 | idx = ADAP_HIGH_CMD_ENTRIES; | ||
274 | else if (qid == AdapNormCmdQueue) | ||
275 | idx = ADAP_NORM_CMD_ENTRIES; | ||
276 | else if (qid == AdapHighRespQueue) | ||
277 | idx = ADAP_HIGH_RESP_ENTRIES; | ||
278 | else if (qid == AdapNormRespQueue) | ||
279 | idx = ADAP_NORM_RESP_ENTRIES; | ||
280 | } | ||
281 | if (idx != le32_to_cpu(*(q->headers.consumer))) | ||
269 | *nonotify = 1; | 282 | *nonotify = 1; |
283 | } | ||
270 | 284 | ||
271 | if (qid == AdapHighCmdQueue) { | 285 | if (qid == AdapHighCmdQueue) { |
272 | if (*index >= ADAP_HIGH_CMD_ENTRIES) | 286 | if (*index >= ADAP_HIGH_CMD_ENTRIES) |