On Wed 2007-01-31 16:54:39, Alan Stern wrote:
> On Wed, 31 Jan 2007, Oliver Neukum wrote:
> 
> > > timer whenever there is any activity, and when the timer expires you know
> > > the device has been idle long enough that you should suspend it.  That's
> > > exactly how the autosuspend infrastructure works.
> > 
> > This would call mod_timer() for every completed in-URB. Are you
> > sure this is better than an approach maintaining a periodical timer
> > and check for IO in the meantime?
> 
> I am not sure it's better.  The decision had to be made when I was
> designing the autosuspend stuff, and I decided to go this way.  Maybe it
> was a wrong decision... it's hard to tell.  It does have the advantage of
> avoiding extra timer events while the device is in use, but as you pointed 
> out, it has the disadvantage of lots of timer rescheduling.

Both solutions are probably okay. mod_timer should be cheap.
                                                                        Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to