Re: PCI DMA into USER space

From: Jes Sorensen (jes@linuxcare.com)
Date: Wed Jun 14 2000 - 10:17:38 EST


>>>>> "Richard" == Richard B Johnson <root@chaos.analogic.com> writes:

Richard> The PCI bridge is bus-mastering hardware. Without the use of
Richard> the CPU at all, hardware writes from a device, write directly
Richard> to RAM wherever you have specified when setting up the PCI
Richard> device. You don't have to suck data through a low-bandwidth
Richard> port using DMA. If you need to copy data, usually the case,
Richard> you have to copy it anyway. It is dumb to incur the DMA setup
Richard> time for memory-to-memory DMA, then wait for the hardware to
Richard> do it. Instead, you just use the data directly.

Rubbish, PCI shared memory is *slow* you want DMA. Granted, PCI shared
memory is faster than the brain dead IO ports but it's far from as
fast as streaming DMA or in particular host memory access. In a modern
PC you easily get 300-400MB/sec of real bandwidth between the CPU and
system memory whereas you'll get far less than 100MB/sec when
accessing the PCI memory (maybe half if you're lucky). As such it is
quite often worth it to DMA to host memory and then let the CPU access
data from there.

Jes

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:31 EST