RE: [PATCH v2 2/2] hv_netvsc: Allocate host-visible GPADL buffers as decrypted contiguous chunks

Michael Kelley <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-hyperv,org.kernel.vger.linux-kernel
Message-ID <SN6PR02MB4157AF2F371ACD488FB2C6F5D4D12@SN6PR02MB4157.namprd02.prod.outlook.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.