[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241011085911.601bad62@kernel.org>
Date: Fri, 11 Oct 2024 08:59:11 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>
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, 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?
Powered by blists - more mailing lists