diff options
author | Alexander Motin <mav@FreeBSD.org> | 2013-10-17 20:19:15 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2013-10-17 20:19:15 +0000 |
commit | 523ea374b63acf0a6149a0d8e24ce421ba8f6147 (patch) | |
tree | d6e49e2206dd1fba00d0578ab372d0bbdbf7acf1 /sys/dev/isp/ispvar.h | |
parent | 7306b85329d165319747c89a6e4cd5dca098356b (diff) | |
download | src-523ea374b63acf0a6149a0d8e24ce421ba8f6147.tar.gz src-523ea374b63acf0a6149a0d8e24ce421ba8f6147.zip |
Optimize isp(4) to reduce CPU usage, especially in target mode:
- Remove two excessive and slow register reads from isp_intr(). Instead
of rereading value every time, assume that registers contain what we have
written there.
- Avoid sequential search through 4096 array elements when looking for
command tag. Use hash of lists to store active tags separately from free
ones and so greatly speedup the searches.
Reviewed by: mjacob
Notes
Notes:
svn path=/head/; revision=256705
Diffstat (limited to 'sys/dev/isp/ispvar.h')
-rw-r--r-- | sys/dev/isp/ispvar.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h index 2023f61de9de..7c8b251d5bcd 100644 --- a/sys/dev/isp/ispvar.h +++ b/sys/dev/isp/ispvar.h @@ -614,8 +614,9 @@ struct ispsoftc { volatile mbreg_t isp_curmbx; /* currently active mailbox command */ volatile uint32_t isp_reqodx; /* index of last ISP pickup */ volatile uint32_t isp_reqidx; /* index of next request */ - volatile uint32_t isp_residx; /* index of next result */ + volatile uint32_t isp_residx; /* index of last ISP write */ volatile uint32_t isp_resodx; /* index of next result */ + volatile uint32_t isp_atioodx; /* index of next ATIO */ volatile uint32_t isp_obits; /* mailbox command output */ volatile uint32_t isp_serno; /* rolling serial number */ volatile uint16_t isp_mboxtmp[MAX_MAILBOX]; |