Hi, On Fri, Jan 22, 2016 at 10:18 AM, Douglas Anderson <dianders at chromium.org> wrote: > This totally reimplements the microframe scheduler in dwc2 to attempt to > handle periodic splits properly. The old code didn't even try, so this > was a significant effort since periodic splits are one of the most > complicated things in USB. > > I've attempted to keep the old "don't use the microframe" schduler > around for now, but not sure it's needed. It has also only been lightly > tested. > > I think it's pretty certain that this scheduler isn't perfect and might > have some bugs, but it seems much better than what was there before. > With this change my stressful USB test (USB webcam + USB audio + some > keyboards) crackles less. > > Signed-off-by: Douglas Anderson <dianders at chromium.org> > --- > Changes in v5: > - Moved defines outside of ifdef to avoid gadget-only compile error. > > Changes in v4: > - Figured out what the microframe scheduler was supposed to do. > - Microframe rewrite is totally different from v3, hopefully more right. > - Microframe rewrite is later in the series now. > > Changes in v3: > - The uframe scheduler patch is folded into optimization series. > - Optimize uframe scheduler "single uframe" case a little. > - uframe scheduler now atop logging patches. > - uframe scheduler now before delayed bandwidth release patches. > - Add defines like EARLY_FRAME_USEC > - Reorder dwc2_deschedule_periodic() in prep for future patches. > - uframe scheduler now shows real usefulness w/ future patches! > - Assuming single_tt is new for v3; not terribly well tested (yet). > - Keep track and use our uframe new for v3. > > Changes in v2: > - Totally rewrote uframe scheduler again after writing test code. > - uframe scheduler atop delayed bandwidth release patches. > > drivers/usb/dwc2/core.h | 85 ++- > drivers/usb/dwc2/hcd.c | 87 ++- > drivers/usb/dwc2/hcd.h | 79 ++- > drivers/usb/dwc2/hcd_queue.c | 1208 +++++++++++++++++++++++++++++++++++------- > 4 files changed, 1271 insertions(+), 188 deletions(-) Needs more testing, but possibly the next version of this patch will include <https://chromium-review.googlesource.com/#/c/323326/>. If you happen to be testing / reviewing this patch, please consider it with the proposed fixup. I'm happy to send out a squashed version if that makes someone's review easier. -Doug