On Mon, 18 Apr 2005, Oliver Neukum wrote: > > > Their own fault. Drivers can do any number of stupid things with > > > interrupts > > > disabled. > > > > Well sure, but that doesn't help. It's part of the API, it's necessary if > > Is it necessary or is it part of the API? If the latter, then the API should > be changed. USB always did an embarrasing amount of work in interrupt > except for the brave people like Dave who actually use tasklets themselves. > The migratory path should be quite clear.
As far as I know it's not necessary. The API could indeed be changed. But that's a bigger job than I want to get into just now! > > completion routines are called with interrupts disabled and they resubmit, > > and it's why the mem_flags argument had to be added to usb_submit_urb. > > It would be needed anyway for the block IO path. Agreed. Although as long as we're changing the API, why not arrange things so that everything is pre-allocated along with the URB and mem_flags isn't needed at all? > > By the way, I'm a little surprised at all the commotion caused by this > > proposal to use a tasklet. Plenty of other drivers and subsystems use > > them. The network code does almost everything in bottom halves, and it > > doesn't suffer from any shortage of latency requirements. And what about > > the block layer? Why should USB be any different? > > It shouldn't. The completion handler should have been called in a bottom half > from the beginning. > But you are proposing something unheard of. Nobody has ever used a tasklet > outside of IRQ handling in a strict sense. The networking code is using > tasklets only on the recieve path. hard_start_xmit() is called conventionally. Ah yes. I rather expected you would mention that. The difference is that with network drivers the submission and completion paths are fairly independent. But with USB they are intimately connected by the need to maintain the hardware schedule. Performance issues aside, I think a single tasklet to handle everything would be the right way to go. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel