Re: [RFT] rtl8187: use DMA-aware buffers with usb_control_msg

From: John W. Linville
Date: Sat May 09 2009 - 12:01:31 EST


On Sat, May 09, 2009 at 06:57:31AM -0700, Greg KH wrote:
> On Sat, May 09, 2009 at 11:38:32AM +0200, Eric Valette wrote:
> > The patch fix the DMA warning and the driver seems to work (just
> > associated it) but I must say that the allocation failure handling path
> > and the fact that we use now kmalloc for allocating a few bytes in such
> > a routine makes me worry about possible negative performance impact
> > unless theses routines are used only in a slow configuration path (did
> > no took time to red the code due to many other problems).
>
> usb_control messages are slow and should not be on the "fast path" of
> any data being sent through the device. Any overhead of the
> kmalloc/kfree is totally eaten up by the actual transmission turn around
> time of the message itself, so you don't have to worry about the
> performance impact.

Yeah, I don't like the original version either. Even if the kmalloc's
aren't a big performance hit, the failure path sucks. I've included a
new version below, but unfortunately I haven't had a chance to test it.
Please give it a try if you get a chance?

> thanks for testing.

Ditto!

---