[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89i+i5t7T-eVN4J1od+9W9XRFM-2=U-5GZ9mddP_pdD0KSg@mail.gmail.com>
Date: Fri, 11 Oct 2024 18:01:00 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
eric.dumazet@...il.com, Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net] netdevsim: use cond_resched() in nsim_dev_trap_report_work()
On Fri, Oct 11, 2024 at 5:59 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Fri, 11 Oct 2024 13:18:43 +0000 Eric Dumazet wrote:
> > --- a/drivers/net/netdevsim/dev.c
> > +++ b/drivers/net/netdevsim/dev.c
> > @@ -848,11 +848,12 @@ static void nsim_dev_trap_report_work(struct work_struct *work)
> > continue;
> >
> > nsim_dev_trap_report(nsim_dev_port);
> > + cond_resched();
> > }
> > devl_unlock(priv_to_devlink(nsim_dev));
> > -
> > - schedule_delayed_work(&nsim_dev->trap_data->trap_report_dw,
> > - msecs_to_jiffies(NSIM_TRAP_REPORT_INTERVAL_MS));
> > + queue_delayed_work(system_unbound_wq,
> > + &nsim_dev->trap_data->trap_report_dw,
> > + msecs_to_jiffies(NSIM_TRAP_REPORT_INTERVAL_MS));
>
> Makes sense, there's one more place which queues this work, in case we
> couldn't grab the lock. Should it also be converted?
Right of course, I will send a v2.
Powered by blists - more mailing lists