[PATCH 3/3] phy: sun4i-usb: Use power efficient workqueue for debounce and poll

Frank Lee tiny.windzz at gmail.com
Wed Nov 11 00:54:21 EST 2020


HI,
On Wed, Nov 11, 2020 at 11:44 AM Samuel Holland <samuel at sholland.org> wrote:
>
> On 11/9/20 6:12 AM, Frank Lee wrote:
> > From: Yangtao Li <frank at allwinnertech.com>
> >
> > The debounce and poll time is generally quite long and the work not
> > performance critical so allow the scheduler to run the work anywhere
> > rather than in the normal per-CPU workqueue.
> >
> > Signed-off-by: Yangtao Li <frank at allwinnertech.com>
> > ---
> >  drivers/phy/allwinner/phy-sun4i-usb.c | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
> > index 651d5e2a25ce..4787ad13b255 100644
> > --- a/drivers/phy/allwinner/phy-sun4i-usb.c
> > +++ b/drivers/phy/allwinner/phy-sun4i-usb.c
> > @@ -326,7 +326,7 @@ static int sun4i_usb_phy_init(struct phy *_phy)
> >               /* Force ISCR and cable state updates */
> >               data->id_det = -1;
> >               data->vbus_det = -1;
> > -             queue_delayed_work(system_wq, &data->detect, 0);
> > +             queue_delayed_work(system_power_efficient_wq, &data->detect, 0);
> >       }
> >
> >       return 0;
> > @@ -444,7 +444,7 @@ static int sun4i_usb_phy_power_on(struct phy *_phy)
> >
> >       /* We must report Vbus high within OTG_TIME_A_WAIT_VRISE msec. */
>
> This doesn't sound like "not performance critical" to me. My understanding is
> the debouncing has a deadline from the USB spec. Maybe this is more flexible
> than the comment makes it sound?

According to my understanding, the more meaning of performance here
comes from cache locality.



More information about the linux-arm-kernel mailing list