Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162046AbbKEPTE (ORCPT ); Thu, 5 Nov 2015 10:19:04 -0500 Received: from netrider.rowland.org ([192.131.102.5]:44068 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1161614AbbKEPTB (ORCPT ); Thu, 5 Nov 2015 10:19:01 -0500 Date: Thu, 5 Nov 2015 10:19:00 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Doug Anderson cc: John Youn , Felipe Balbi , Yunzhi Li , =?UTF-8?Q?Heiko_St=C3=BCbner?= , "open list:ARM/Rockchip SoC..." , Julius Werner , "Herrero, Gregory" , "Kaukab, Yousaf" , Dinh Nguyen , John Youn , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Ming Lei Subject: Re: [PATCH 2/3] usb: dwc2: host: Giveback URB in tasklet context In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1417 Lines: 33 On Wed, 4 Nov 2015, Doug Anderson wrote: > In the ChromeOS gerrit > Julius Werner > points out that for EHCI it was good to take the optimization from > commit 9118f9eb4f1e ("USB: EHCI: improve interrupt qh unlink") before > this one. I'm still trying to learn USB / dwc2 so it's unclear to me > whether we also need a similar change before landing. > > I'll see if I can do some investigation about this and also some > benchmarking before and after. Certainly profiling the interrupt > handler itself showed a huge improvement, but I'd hate to see a > regression elsewhere. > > If anyone else knows better than I, please speak up! :) This is a matter of both efficiency and correctness. Giving back URBs in a tasklet is not a simple change. Have you read the kerneldoc for usb_submit_urb() in drivers/usb/core/urb.c? The portion about "Reserved Bandwidth Transfers" is highly relevant. I don't know how dwc2 goes about reserving bandwidth for periodic transfers, but if it relies on the endpoint queue being non-empty to maintain a reservation then it will be affected by this change. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/