Re: PCI DMA to small buffers on cache-incoherent arch

Albert D. Cahalan
2002-06-09T06:57:28Z

Oliver Neukum writes:

>> For memory --> device DMA:
>>
>> 1. write back all cache lines affected by the DMA
>> 2. start the DMA
>> 3. invalidate the above cache lines
>
> Why the third step ? That data should still
> be valid.

I made a mistake, but perhaps it is a good one.
There is no need to invalidate the cache lines,
but I'd guess that commonly the data won't be
used again. Doing the invalidate would free up
some cache lines, meaning that the CPU would
have empty slots to use for other stuff.