[PATCH] IB/ipath: reduce overhead on receive interrupts

Also count the number of interrupts where that works (fastrcvint).  On any
interrupt where the port0 head and tail registers are not equal, just call the
ipath_kreceive code without reading the interrupt status, thus saving the
approximately 0.25usec processor stall waiting for the read to return.  If any
other interrupt bits are set, or head==tail, take the normal path, but that
has been reordered to handle read ahead of pioavail.  Also no longer call
ipath_kreceive() from ipath_qcheck(), because that just seems to make things
worse, and isn't really buying us anything, these days.

Also no longer loop in ipath_kreceive(); better to not hold things off too
long (I saw many cases where we would loop 4-8 times, and handle thousands (up
to 3500) in a single call).

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Cc: "Michael S. Tsirkin" <mst@mellanox.co.il>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Šī revīzija ir iekļauta:
Bryan O'Sullivan
2006-07-01 04:36:04 -07:00
revīziju iesūtīja Linus Torvalds
vecāks f37bda9246
revīzija 13aef4942c
4 mainīti faili ar 105 papildinājumiem un 73 dzēšanām

Parādīt failu

@@ -888,12 +888,7 @@ void ipath_kreceive(struct ipath_devdata *dd)
(u32)le64_to_cpu(*dd->ipath_hdrqtailptr))
goto done;
gotmore:
/*
* read only once at start. If in flood situation, this helps
* performance slightly. If more arrive while we are processing,
* we'll come back here and do them
*/
/* read only once at start for performance */
hdrqtail = (u32)le64_to_cpu(*dd->ipath_hdrqtailptr);
for (i = 0, l = dd->ipath_port0head; l != hdrqtail; i++) {
@@ -1022,10 +1017,6 @@ gotmore:
dd->ipath_port0head = l;
if (hdrqtail != (u32)le64_to_cpu(*dd->ipath_hdrqtailptr))
/* more arrived while we handled first batch */
goto gotmore;
if (pkttot > ipath_stats.sps_maxpkts_call)
ipath_stats.sps_maxpkts_call = pkttot;
ipath_stats.sps_port0pkts += pkttot;