Re: [PATCH 1/4] loop: Use worker per cgroup instead of kworker

From: Dan Schatzberg
Date: Tue Apr 21 2020 - 09:55:40 EST


On Tue, Apr 21, 2020 at 10:48:45AM +0800, Hillf Danton wrote:
>
> On Mon, 20 Apr 2020 18:39:29 -0400 Dan Schatzberg wrote:
> >
> > @@ -1140,8 +1215,17 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
> > blk_mq_freeze_queue(lo->lo_queue);
> >
> > spin_lock_irq(&lo->lo_lock);
> > + destroy_workqueue(lo->workqueue);
>
> Destruct it out of atomic context.

I may as well do this, but it doesn't matter, does it? The
blk_mq_freeze_queue above should drain all I/O so the workqueue will
be idle.