2022-02-14 20:02:06

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH] xhci: reduce xhci_handshake timeout in xhci_reset

Hello!

On 2/14/22 2:04 PM, Pavankumar Kondeti wrote:

> From: Daehwan Jung <[email protected]>
>
> xhci_reset() is called with interrupts disabled. Waiting 10 seconds for
> controller reset and controller ready operations can be fatal to the
> system when controller is timed out. Reduce the timeout to 1 second
> and print a error message when the time out happens.

Waiting 1 second with IRQs diabled is also hardly acceptable. :-/

>
> Fixes: 22ceac191211 ("xhci: Increase reset timeout for Renesas 720201 host.")
> Signed-off-by: Daehwan Jung <[email protected]>
> Signed-off-by: Pavankumar Kondeti <[email protected]>
[...]

MBR, Sergey


2022-02-15 05:48:19

by Pavan Kondeti

[permalink] [raw]
Subject: Re: [PATCH] xhci: reduce xhci_handshake timeout in xhci_reset

On Mon, Feb 14, 2022 at 06:45:30PM +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 2/14/22 2:04 PM, Pavankumar Kondeti wrote:
>
> > From: Daehwan Jung <[email protected]>
> >
> > xhci_reset() is called with interrupts disabled. Waiting 10 seconds for
> > controller reset and controller ready operations can be fatal to the
> > system when controller is timed out. Reduce the timeout to 1 second
> > and print a error message when the time out happens.
>
> Waiting 1 second with IRQs diabled is also hardly acceptable. :-/
>

Thanks for making this point clear.

Having debugged several performance issue related to preemption and irqs
disabled, I can't agree more. We had to chase down the code that disable
scheduling for more than 2-3 msec in our downstream kernels on a mobile
SoC.

However in this case, we run into timeout very very rarely in which case
10 sec timeout is causing system hang like symptops which we want to avoid.

Thanks,
Pavan