From: Kameron Carr <[email protected]> Sent: Thursday, August 6, 
2026 1:06 PM
> 
> On Friday, July 31, 2026 8:47 AM, Michael Kelley wrote:
> > From: Kameron Carr <[email protected]> Sent: Thursday, July 
> > 30, 2026 4:34 PM

[snip]

> > > diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
> > > index 59e95341f9b1e..1192929d93a86 100644
> > > --- a/drivers/net/hyperv/netvsc.c
> > > +++ b/drivers/net/hyperv/netvsc.c
> > > @@ -28,6 +28,8 @@
> > >  #include "hyperv_net.h"
> > >  #include "netvsc_trace.h"
> > >
> > > +static struct workqueue_struct *netvsc_wq;
> > > +
> >
> > Does netvsc needs its own workqueue to do the "free" operation,
> > or would the system default workqueue (system_dfl_wq) be just
> > as good? At first glance, the system_dfl_wq seems like it would work,
> > since netvsc free operations are rare and don't have any strict
> > latency requirements. But I'm far from being expect in workqueues,
> > and there could be subtleties I'm not aware of.
> 
> I have to drain the work queue before module unload.
> Currently this is handled by destroying the queue.
> 
> Originally, I tried using a system wide queue, but I saw that there are
> compile time warnings, __warn_flushing_systemwide_wq(), which state:
> "WARNING: Flushing system-wide workqueues will be prohibited in near
> future."
> 

OK, that's make good sense. There is indeed a subtlety. :-)  I had not
ever thought about the problem of unloading a module if a function
in the module is being run by a workqueue.

Thanks,

Michael

Reply via email to