diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2016-08-31 06:44:56 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-09-14 20:11:12 +0200 |
commit | 08348b1c9b6f78430fecb120fd0c4b8c044d3639 (patch) | |
tree | 9ff73cbadf624259034bbcdb3424048abef802af /drivers/scsi/NCR5380.h | |
parent | scsi: virtio_scsi: Use complete() instead complete_all() (diff) | |
download | linux-08348b1c9b6f78430fecb120fd0c4b8c044d3639.tar.xz linux-08348b1c9b6f78430fecb120fd0c4b8c044d3639.zip |
scsi: ncr5380: Improve interrupt latency during PIO tranfers
Large PIO transfers are broken up into chunks to try to avoid disabling
local IRQs for long periods. But IRQs are still disabled for too long
and this causes SCC FIFO overruns during serial port transfers.
This patch reduces the PIO chunk size to reduce interrupt latency to
something on the order of milliseconds, at the expense of additional CPU
overhead from extra iterations of the NCR5380_main() loop.
That CPU overhead is a problem for slow machines (e.g. mac_scsi on 25
MHz 68030) but these machines generally use PDMA not PIO. This patch
doesn't make the overhead any worse on my Mac LC III (because it only
gets about 510 accesses per ms).
This patch decreases disk performance by a fraction of one percent for
dmx3191d on my 333 MHz PowerPC 750. Other affected hardware (such as
g_NCR5380 on x86) was not tested but 5380 ISA cards generally use PDMA
and not PIO.
[mkp: fix whitespace]
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/scsi/NCR5380.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h index 2ed61b5d40e6..965d92339455 100644 --- a/drivers/scsi/NCR5380.h +++ b/drivers/scsi/NCR5380.h @@ -250,6 +250,8 @@ struct NCR5380_cmd { #define NCR5380_CMD_SIZE (sizeof(struct NCR5380_cmd)) +#define NCR5380_PIO_CHUNK_SIZE 256 + static inline struct scsi_cmnd *NCR5380_to_scmd(struct NCR5380_cmd *ncmd_ptr) { return ((struct scsi_cmnd *)ncmd_ptr) - 1; |