From: Simon Horman <horms@kernel.org>
To: netdev-bot+sashiko@kernel.org
Cc: marco.crivellari@suse.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, tj@kernel.org, jiangshanlai@gmail.com,
frederic@kernel.org, bigeasy@linutronix.de, mhocko@suse.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, enelsonmoore@gmail.com,
linux-usb@vger.kernel.org
Subject: Re: [PATCH net-next v4 2/6] net: ti: icssg-stats: Move long delayed work on system_dfl_long_wq
Date: Sun, 18 Oct 2026 15:34:42 +0100 [thread overview]
Message-ID: <20261018143442.GM503057@horms.kernel.org> (raw)
In-Reply-To: <179188543192.434549.4257004266357227847@kernel.org>
On Tue, Oct 13, 2026 at 09:57:11AM +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue(s) to consider.
>
> Critical: 0 · High: 0 · Medium: 1 · Low: 0
>
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
>
> - [Medium] The conversion is incomplete, so one delayed_work is queued on
> two different workqueues.
>
> --
>
> net: ti: icssg-stats: Move long delayed work on system_dfl_long_wq
>
> This commit changes the self-requeue in icssg_stats_work_handler() from
> the per-cpu system_long_wq to the unbound system_dfl_long_wq. The goal is
> to let the periodic stats work benefit from scheduler task placement.
>
> > diff --git a/drivers/net/ethernet/ti/icssg/icssg_stats.c b/drivers/net/ethernet/ti/icssg/icssg_stats.c
> > index 7159baa0155cf..7d6d6692d8192 100644
> > --- a/drivers/net/ethernet/ti/icssg/icssg_stats.c
> > +++ b/drivers/net/ethernet/ti/icssg/icssg_stats.c
> > @@ -69,7 +69,7 @@ void icssg_stats_work_handler(struct work_struct *work)
> > stats_work.work);
> > emac_update_hardware_stats(emac);
> >
> > - queue_delayed_work(system_long_wq, &emac->stats_work,
> > + queue_delayed_work(system_dfl_long_wq, &emac->stats_work,
> > msecs_to_jiffies((STATS_TIME_LIMIT_1G_MS * 1000) / emac->speed));
> > }
>
> [Severity: Medium]
> Is this conversion complete?
>
> Both ICSSG drivers use icssg_stats_work_handler() for the same
> emac->stats_work. Both prueth_netdev_init() functions, in icssg_prueth.c
> and icssg_prueth_sr1.c, do this:
>
> INIT_DELAYED_WORK(&emac->stats_work, icssg_stats_work_handler);
>
> However, the first run is still queued on the per-cpu workqueue from
> the ndo_open path:
>
> drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c:emac_ndo_open() {
> ...
> queue_work(system_long_wq, &emac->stats_work.work);
> ...
> }
>
> The follow-up patch "net: ti: icssg-prueth: Move long delayed work on
> system_dfl_long_wq" converts the matching call in icssg_prueth.c. No
> patch in the series seems to change icssg_prueth_sr1.c.
>
> On SR1.0 hardware, the first stats run after each open would still go to
> a per-cpu worker. Every later run would go to system_dfl_long_wq.
>
> Could mixing the two workqueues also bypass the non-reentrancy check in
> __queue_work()?
>
> kernel/workqueue.c:__queue_work() {
> ...
> if (worker && worker->current_pwq->wq == wq) {
> ...
> }
>
> The instance running on system_long_wq re-arms onto system_dfl_long_wq,
> so this check fails. If the timer expires before the first worker
> returns, a second instance could start at the same time on another
> worker.
>
> Today this looks harmless. The handler does nothing after
> queue_delayed_work(), and emac_update_hardware_stats() takes
> prueth->stats_lock.
>
> Should emac_ndo_open() in icssg_prueth_sr1.c also switch to
> system_dfl_long_wq, so stats_work is only ever queued on one workqueue?
It seem to me that it would be worth getting this right upfront.
--
pw-bot: changes-requested
next prev parent reply other threads:[~2026-10-18 14:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 9:54 [PATCH net-next v4 0/6] net: Move system_long_wq to system_dfl_long_wq Marco Crivellari
2026-10-12 9:54 ` [PATCH net-next v4 1/6] ibmvnic: Move long delayed work on system_dfl_long_wq Marco Crivellari
2026-10-13 9:57 ` netdev-bot+sashiko
2026-10-16 21:19 ` mingming cao
2026-10-19 10:18 ` Marco Crivellari
2026-10-12 9:54 ` [PATCH net-next v4 2/6] net: ti: icssg-stats: " Marco Crivellari
2026-10-13 9:57 ` netdev-bot+sashiko
2026-10-18 14:34 ` Simon Horman [this message]
2026-10-19 9:55 ` Marco Crivellari
2026-10-12 9:54 ` [PATCH net-next v4 3/6] net: ti: icssg-prueth: " Marco Crivellari
2026-10-13 9:57 ` netdev-bot+sashiko
2026-10-12 9:54 ` [PATCH net-next v4 4/6] net: thunderbolt: " Marco Crivellari
2026-10-13 9:57 ` netdev-bot+sashiko
2026-10-12 9:54 ` [PATCH net-next v4 5/6] net: usb: pegasus: " Marco Crivellari
2026-10-12 9:54 ` [PATCH net-next v4 6/6] net: usb: r8152: " Marco Crivellari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261018143442.GM503057@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=enelsonmoore@gmail.com \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=marco.crivellari@suse.com \
--cc=mhocko@suse.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®