Re: [PATCH] libata, freezer: avoid block device removal while system is frozen

From: Rafael J. Wysocki
Date: Tue Dec 17 2013 - 19:10:44 EST


On Tuesday, December 17, 2013 07:36:43 AM Tejun Heo wrote:
> Hello, Rafael.
>
> On Tue, Dec 17, 2013 at 03:38:05AM +0100, Rafael J. Wysocki wrote:
> > On Friday, December 13, 2013 03:40:34 PM Tejun Heo wrote:
> > > Hello,
> > >
> > > So, this is the laughable workaround that I came up with. Seriously,
> > > this is tragic. :(
> > >
> > > Thanks.
> > >
> > > ------- 8< -------
> > > Freezable kthreads and workqueues are fundamentally problematic in
> > > that they effectively introduce a big kernel lock widely used in the
> > > kernel and have already been the culprit of several deadlock
> > > scenarios. This is the latest occurrence.
> >
> > OK, so I'm too tired now to go through all that, but I'll look at it tomorrow.
> >
> > The rule of thumb is to get rid of freezable kernel threads in the first
> > place if possible anyway if they are causing problems to happen.
>
> Yes, that'd be awesome. In fact, getting rid of all kernel freezables
> in non-low-level-drivers would be a great step forward.

Agreed.

> That said, we need something easily backportable so I think we probably need
> this bandaid for immediate fix for now.

Well, we need something, but I have a couple of concerns about this particular
patch (I'll reply to it with comments shortly).

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/