On Thu, Nov 20 2003, Alan Stern wrote: > On Thu, 20 Nov 2003, Jens Axboe wrote: > > > Then you just cannot do zero-copy dma, if the buffer isn't aligned > > properly. It's as simple as that. And surely that wont kill you > > performance wise. > > > > Doing bounce buffering to just maintain the use of mapping user pages > > into the kernel ls out right silly. > > > > So no, I still don't think we have to add anything. Just don't do_dio if > > the alignment doesn't allow it. Ditto for sg. > > The answer seems very simple. There should be a host template entry for > dma buffer alignment (there's already a dma_boundary member). It would be > copied into the device's request queue stucture if it is nonzero, > overriding the default value of 512. sg and st should check the user > buffer against the request queue's dma_alignment mask and avoid doing > direct I/O if the alignment is wrong -- just fall back to normal I/O. > > Any objections to this scheme?
Well yes, that's what my objection is against - adding that member. Did you not read any of my mails? And it's quite simple why - basically noone will add it, so it'll end up being 512 anyways. I just don't see the point. It's a miniscule optimization. If you need that last bit of performance, then align your buffers and noone loses. See? -- Jens Axboe ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel