On 2/5/07, Olaf Kirch <[EMAIL PROTECTED]> wrote:
Nowhere in the dma_async_*complete functions can I see any code that would sleep if the DMA is not yet complete. Am I missing something, or are we really busy-waiting on the DMA engine? Wouldn't this kind of defeat the purpose of freeing up the CPU from the chores of memcpying?
It is busy waiting, but only because the TCP socket use initiates the DMA copies from the softirq and they have time to complete during the switch back to application context. Going back to sleep and creating more context switching made things worse. I'm working on seeing if completion interrupts could be used with a better thought out implementation, the performance implications aren't fully clear to me yet. For other uses, interrupts are probably desired.
I also checked the code in ioatdma.c - I would have expected there to be some kind of interrupt handler that kicks the upper layers when a DMA operation completes. But the interrupt handler seems to be for error reporting exclusively...
It's just not there now, but it can be added easily, it's one bit in the descriptor and a register read in the interrupt handler to see which channel(s) need attention. - Chris - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html