Re: [PATCH] usb: gadget: aspeed: improve vhub port irq handling

From: Tao Ren
Date: Thu Mar 05 2020 - 00:56:37 EST


On Thu, Mar 05, 2020 at 02:35:08PM +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2020-03-04 at 18:38 -0800, rentao.bupt@xxxxxxxxx wrote:
> > From: Tao Ren <rentao.bupt@xxxxxxxxx>
> >
> > This patch evaluates vhub ports' irq mask before going through per-
> > port
> > irq handling one by one, which helps to speed up irq handling in case
> > there is no port interrupt.
> >
> > Signed-off-by: Tao Ren <rentao.bupt@xxxxxxxxx>
>
> Looks reasonable, but did you try a find_next_bit() loop and whether
> that's faster ?

Make sense. It should be more efficient especially when most ports are
idle (and I guess it's a common case). Will try and send out v2 soon.


Cheers,

Tao