From: Rasesh Mody <redacted>
Date: Tue, 23 Aug 2011 10:56:00 -0700
quoted hunk ↗ jump to hunk
+ BNA_QE_INDX_ADD(_index, 1, _depth); \
+ for (j = 0; j < (_frag); j++) { \
+ prefetch(&(_array)[(_index) + 1]); \
+ dma_unmap_page(_pdev, dma_unmap_addr(&(_array)[_index], \
This prefetch is excessive and a waste of cpu cycles.
You're going to prefetch a full 64-byte (or even 128-byte) cache line
for every 16-byte blob (at best) you iterate over. This means you'll
prefetch the same cache line, needlessly, over and over again.
This is a really terrible patch series, and I'm frankly exhausted from
reviewing it. I don't want to see another revision of this series for
at least one week. Read it over carefully, meanwhile.
There is very little thought, and way too much arbitrary tinkering
going on in this driver.