From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Oliver Neukum <oneukum@suse.com>
Cc: Marco Crivellari <marco.crivellari@suse.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>,
Frederic Weisbecker <frederic@kernel.org>,
Michal Hocko <mhocko@suse.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Petko Manolov <petkan@nucleusys.com>,
linux-usb@vger.kernel.org
Subject: Re: [PATCH v3 net-next 5/6] net: usb: pegasus: Move long delayed work on system_dfl_long_wq
Date: Tue, 25 Aug 2026 17:18:12 +0200 [thread overview]
Message-ID: <20260825151812.4aJyFUgE@linutronix.de> (raw)
In-Reply-To: <f972b514-87ef-45bc-8258-db199a4cc0b8@suse.com>
On 2026-07-22 10:29:50 [+0200], Oliver Neukum wrote:
> On 20.07.26 12:08, Marco Crivellari wrote:
> Hi,
Hi Oliver,
> > Since the workqueue work doesn't rely on per-cpu variables, there is no
> > obvious reason that justify the use of a per-cpu workqueue. So change
> > system_long_wq with system_dfl_long_wq so that the work may benefit from
> > scheduler task placement.
>
> these changes are problematic, although they look like a good cleanup
> in first place. But the test you are using to determine whether USB
> devices need their own work queue is incomplete because you are not
> considering the reason they allocate their own work queues.
This driver does not using its own workqueue.
> These drivers have their own work queues because they are part of the block layer.
> USB devices can share a device with a block device (storage & UAS) and
> USB devices have common, per device operations, in particular reset
> and runtime power management and disconnect handling. Because these operations
> can be necessary to complete block IO neither they nor anything
> they depend on can use IO to allocate memory. That is they need to
> perform any memory allocation with GFP_NOIO or GFP_ATOMIC.
This is a networking driver. It has nothing to do with storage and UAS.
It uses USB, yes.
> That is also true for any operation on a work queue they need to wait
> for to make progress. That means you cannot limit your check to per-cpu
> variables. You also need to check for such dependencies. In particular
> any usage of flush_work() on such queues can deadlock, if you use
> common queues.
It has nothing to do with per-CPU variables. In fact its
queue_delayed_work(,, CARRIER_CHECK_DELAY) usage already ensures that it
can be executed on a random and not on the submitting CPU.
> Please refrain from making such changes unless you have fully analyzed
> the dependencies.
Did you refer to the wrong patch? As far as this patch goes I can not
reason why you assume Marco did not fully analyze the dependencies. I
don't see anything wrong with this patch.
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Regards
> Oliver
>
Sebastian
next prev parent reply other threads:[~2026-08-25 15:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260720100902.155605-1-marco.crivellari@suse.com>
2026-07-20 10:08 ` [PATCH v3 net-next 5/6] net: usb: pegasus: Move long delayed work on system_dfl_long_wq Marco Crivellari
2026-07-22 8:29 ` Oliver Neukum
2026-08-25 15:18 ` Sebastian Andrzej Siewior [this message]
2026-08-27 16:01 ` Alan Stern
2026-08-28 9:43 ` Sebastian Andrzej Siewior
2026-08-28 14:10 ` Alan Stern
2026-07-20 10:08 ` [PATCH v3 net-next 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=20260825151812.4aJyFUgE@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.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@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=pabeni@redhat.com \
--cc=petkan@nucleusys.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