[PATCH] iso pipe support for usbatm

Roman Kagan rkagan at mail.ru
Thu Mar 24 16:11:11 EST 2005


On Thu, Mar 24, 2005 at 07:02:35PM +0100, matthieu castet wrote:
> Roman Kagan wrote:
> >Alternatively, if we move the stuff to support the status polling from
> >the individual drivers to usbatm, we can use the polling heartbeat to
> >also schedule rx and tx tasklets.
> I don't know if it is a good idea, this can't fit for all the modem driver.

Why?  You'd only get additional scheduling of the rx and tx tasklets
every few seconds.  If they have nothing to do they'd just do nothing.

> >Which approach do you think is better?
> I think we should always call tasklet_schedule, and manage the error 
> with another way(put the buffer in the empty list, make sure lenght = 0, 
> check for killed status, ...).

Most errors are rather straightforward, you just clean up the failed
operation and take one step back.  The only question is how to handle
urb submission errors.  Simple cleanup as in my patch may lead to a
deadlock, if nothing reschedules the tasklet.  The way it was done
originally - keep on retrying - may lead to a livelock if the error
repeats itself.  Doing immediate scheduling of the tasklet is probably
better in that I guess it'll call schedule() between the successful
tasklet runs and thus let other stuff run too, but the right way seems
to be to throttle the resubmission.  One way to do that is to schedule
the tasklet after a fixed delay on a per error basis.  Аnother is to
periodically schedule both rx and tx tasklets, to keep the life in this
subtle body (hence "heartbeat").  A byproduct of this would be that
subdrivers could use it for status polling.  Thus it could save a few
bytes at the price of a few wasted cycles.

Roman.



More information about the Usbatm mailing list