Re: PCI DMA into USER space

From: David Hinds (dhinds@valinux.com)
Date: Thu Jun 15 2000 - 12:22:56 EST


On Thu, Jun 15, 2000 at 07:24:36AM +0100, Philip Blundell wrote:
> >I don't know if there is really any speed advantage to using memory
> >mapped IO or bus mastering operations; I think the only difference at
> >the bus level is which device is the initiator of the transaction.
> >There is of course a difference in host CPU utilization.
>
> With PCI it is usually much faster to write than to read. So if you
> are moving data towards the CPU it is better to have a busmaster
> peripheral write it into host memory than have the CPU pull it
> across the bus. There's also a tradeoff with latency, though this
> isn't often all that important.

Is the write/read difference still true for "long" transfers (say
packet sized or buffer sized)? I'd think there would be an edge for
short transfers that can be completely absorbed by write queues, but
for longer transfers, read prefetch would hide much of the latency.

Also most peripherals of interest are bi-directional. The write/read
trade-off may work in one direction (say a bus master network card
pushing incoming packets to the host) but works against you in the
other direction (the bus master network card has to pull packets from
host memory to push onto the wire). So this still isn't an argument
in favor of bus mastering. I don't know if any interesting devices do
bus mastering just for inbound transfers and shared memory IO just for
outbound transfers.

-- Dave

-
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:35 EST