Re: [PATCH 0/2] USB: resume time optimization by using spec minimums

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2016-12-03 at 10:05 +0100, Greg KH wrote:
> On Fri, Dec 02, 2016 at 10:36:59PM -0800, Todd Brandt wrote:
> > The USB resume code in the kernel currently uses a set of hard coded
> > delay values that are defined in the USB 2.0 spec. Specifically these
> > three have the most effect on resume time:
> > 
> >  - tdrsmdn: resume signal time (20ms - infinity) usb 2.0 spec 7.1.7.7
> >  - trsmrcy: resume recovery time (10ms) usb 2.0 spec 7.1.7.7
> >  - trstrcy: reset recovery time (0ms - infinity) usb 2.0 spec 7.1.7.5
> > 
> > These values have been padded considerably in order to accomodate
> > non-compliant devices.
> > 
> >  - tdrsmdn: resume signal time = 40ms
> >  - trsmrcy: resume recovery time = 10ms
> >  - trstrcy: reset recovery time = 50ms
> > 
> > I propose that we remove the padding and use the spec minumums instead.
> > 
> > The following patches do this by creating a struct which contains
> > these three values, and allowing a module parameter to select between
> > the current defaults and the spec minimums. The patch could be
> > simplified to just use 3 defines, but I'm wary of making changes to
> > core USB code without providing a backup and alot of community testing.
> 
> I think these values have grown over the years due to bad devices being
> reported.  Look at the kernel logs for details.  So we can not reduce
> them by default.
> 
> That being said, this is a nice change, but I really hate module
> parameters.

I could make it a global parameter like usb_spec_minimums=1, would that
be better or just as bad?

> > The first part is the core functionality. The second part provides a
> > debug interface through sysfs to tweak the values directly at runtime.
> > 
> > I've created a blog entry on 01.org with some analyze_suspend test
> > cases illustrating the benefits:
> > 
> >  - https://01.org/suspendresume/blogs/tebrandt/2016/usb-resume-optimization-using-spec-minimum-delays
> 
> Put this link in your first patch changelog please?

ok

> thanks,
> 
> greg k-h


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux