On Thu, 5 Jun 2003, Oliver Neukum wrote: > > So here, for example, to what extent does it matter that the buffer is not > > allocated separately? Would moving it to the start of the whole > > kmalloc'ed structure solve the problem? > > No. > > > Is this a question of each DMA master having to write in units of entire > > cachelines, thereby interfering with whatever data the CPU happens to > > store in the same cachelines? > > No, the other way round. The CPU writes whole cachelines. This corrupts > parts of a cacheline not up to date in the CPU's cache. > > > And does this also mean that it's effectively impossible to dynamically > > allocate any region smaller than a cacheline? > > Yes.
That helps. So a buffer used for device input should be allocated separately from anything written by the CPU, whereas a buffer used for device output can be shared with other data in a buffer allocated by kmalloc, but not on the stack. How does the DMA driver arrange to flush the CPU's cache before starting a DMA out operation? I didn't notice any particular code to do that in the UHCI HCD. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
