> I've thought about that on occasion. On some processors you'd > need to flush the userspace caches first, but on typical PC-ish > stuff the main concern would be making sure that the buffers are > aligned nicely ... i.e. only start a 512 byte packet on a 512 byte > boundary, since if it crosses pages then most systems aren't going > to be able to turn it into DMA-contiguous address space. (Even > with an IOMMU, it's not guaranteed ...) In terms of USB protocol, > one 512 packet != two packets of 500 + 12.
If it's not aligned nicely, then you could send the initial unaligned bit in it's own urb, by copying, and the rest directly out of the userspace buffer. I guess the philosophy should be: data will be transferred correctly regardless of whether the user-space buffer is well-aligned or not, however if user-space wants maximum performance then it is responsible for providing an optimally aligned buffer. Ciao, D. ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel