Re: [PATCH for-rc 2/2] IB/mlx5: Fix how advise_mr() launches async work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 13, 2019 at 10:46:08AM +0200, Leon Romanovsky wrote:

> > > Who enqueues work to dev->advise_mr_wq? schedule_work() in
> > > mlx5_ib_advise_mr_prefetch() does to global workqueue.
> >
> > Ah! I *thought* I checked this, yes, using the system work queue is
> > why I added the put_device :)
> >
> > > It should be done to advise_mr_wq().  This will give chance to flush
> > > the wq when IB device is unregistered by the core.
> >
> > Good question - Moni??
> 
> It is definitely missed in my review, but if the IB/core doesn't flush
> general system queue on driver removal, we are better to fix this.
> 
> First addition of new works should be stopped and second system
> queue should be flushed. My general guideline is to avoid creating
> extra workqueues and I saw number of drivers are using system
> queues.

It is up to each driver to flush all the work queues it uses after
ib_unregister_driver completes and before it allowed module unload to
proceed.

Jason




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux