Re: PCI DMA into USER space

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


On Thu, Jun 15, 2000 at 05:09:48AM +0200, Jes Sorensen wrote:
>
> Not really

I think several people think there is no confusion in their own minds
but they are talking about different things. At least one person in
the discussion was describing DMA involving a DMA controller. And
there *is* such a thing as PCI DMA, where a third device on the bus
coordinates transfers between a peripheral and system memory, which is
distinct from regular bus mastering.

> David> I don't know if there is really any speed advantage to using
> David> memory mapped IO or bus mastering operations; I think the only
> David> difference at the bus level is which device is the initiator of
> David> the transaction. There is of course a difference in host CPU
> David> utilization.
>
> There are great speed differences in using bus mastering of data
> compared to memmory mapping the PCI shared memory since CPU access to
> PCI shared memory is significantly slower than to host memory. Even if
> PCI is running at full theoretical blast, which it rarely is due to
> transaction overhead and the fact that most PCI controllers aren't all
> that great.

No. Read what I said and think about it. My argument is that if you
compare a network card that has PCI shared memory, with a network card
that does bus mastering to buffers in host RAM, you'll see that
exactly the same number of system bus and PCI bus transactions are
required to send or receive a packet. In one case the CPU is
initiator; in the other the card is initiator. So there is a
difference in CPU utilization. There is not a difference in bus
utilization. Bus mastering is "faster" because it offloads work from
the CPU. PCI bus mastering transactions are not more efficient at the
bus level than shared memory transactions: the PCI bus does not
distinguish between them, they are all just PCI reads or writes.

-- 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