Re: high irqs-off latency caused by USB serial driver

2017-08-23 Thread Alan Stern
On Wed, 23 Aug 2017, David Mosberger wrote: > Alan, > > On Wed, Aug 23, 2017 at 10:30 AM, Alan Stern > wrote: > > >> Does anybody know why HCD_BH is not enabled in ohci-hcd.c? > > > > Because it changes the semantics of isochronous and interrupt > > streaming. See

Re: high irqs-off latency caused by USB serial driver

2017-08-23 Thread Alan Stern
On Wed, 23 Aug 2017, David Mosberger wrote: > Actually, I just found this commit: > > 94dfd7edf USB: HCD: support giveback of URB in tasklet context > > It won't fix the problem entirely, but I think it should cut the worst-case > irqs-disabled latency about in half, which would be a good

Re: high irqs-off latency caused by USB serial driver

2017-08-23 Thread Alan Stern
On Wed, 23 Aug 2017, David Mosberger wrote: > On Tue, Aug 22, 2017 at 3:40 PM, Greg KH wrote: > > On Tue, Aug 22, 2017 at 02:44:20PM -0600, David Mosberger wrote: > > >> > There was an option a while ago to turn USB irqs > >> > into threaded irqs, do those work on

Re: high irqs-off latency caused by USB serial driver

2017-08-23 Thread David Mosberger
Actually, I just found this commit: 94dfd7edf USB: HCD: support giveback of URB in tasklet context It won't fix the problem entirely, but I think it should cut the worst-case irqs-disabled latency about in half, which would be a good improvement. Does anybody know why HCD_BH is not enabled in

Re: high irqs-off latency caused by USB serial driver

2017-08-23 Thread David Mosberger
On Tue, Aug 22, 2017 at 3:40 PM, Greg KH wrote: > On Tue, Aug 22, 2017 at 02:44:20PM -0600, David Mosberger wrote: >> > There was an option a while ago to turn USB irqs >> > into threaded irqs, do those work on your platform? If so, that might >> > help you out here.

Re: high irqs-off latency caused by USB serial driver

2017-08-22 Thread David Mosberger
On Tue, Aug 22, 2017 at 3:40 PM, Greg KH wrote: > On Tue, Aug 22, 2017 at 02:44:20PM -0600, David Mosberger wrote: >> Greg, >> >> On Tue, Aug 22, 2017 at 2:25 PM, Greg KH wrote: >> >> > USB has always been a big problem with this, the IRQ

Re: high irqs-off latency caused by USB serial driver

2017-08-22 Thread Greg KH
On Tue, Aug 22, 2017 at 02:44:20PM -0600, David Mosberger wrote: > Greg, > > On Tue, Aug 22, 2017 at 2:25 PM, Greg KH wrote: > > > USB has always been a big problem with this, the IRQ patch is very long, > > and messy and complex. > > Yeah. > > > There was an

Re: high irqs-off latency caused by USB serial driver

2017-08-22 Thread David Mosberger
Greg, On Tue, Aug 22, 2017 at 2:25 PM, Greg KH wrote: > USB has always been a big problem with this, the IRQ patch is very long, > and messy and complex. Yeah. > There was an option a while ago to turn USB irqs > into threaded irqs, do those work on your platform?

Re: high irqs-off latency caused by USB serial driver

2017-08-22 Thread Greg KH
On Tue, Aug 22, 2017 at 12:42:33PM -0600, David Mosberger wrote: > Has anyone here looked into reducing the amount of time the USB serial > driver disables interrupts? On an ARM system, I'm seeing about 746 us > of latency for handling a USB interrupt, which seems rather excessive. > I attached a

high irqs-off latency caused by USB serial driver

2017-08-22 Thread David Mosberger
Has anyone here looked into reducing the amount of time the USB serial driver disables interrupts? On an ARM system, I'm seeing about 746 us of latency for handling a USB interrupt, which seems rather excessive. I attached a trace captured with the irqsoff tracer. Note: the 500MHz ARM cycle