Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

From: Rafael J. Wysocki
Date: Tue Sep 09 2014 - 16:34:12 EST


On Wednesday, September 10, 2014 01:46:58 AM Tejun Heo wrote:
> Hello,
>
> On Tue, Sep 09, 2014 at 06:06:25PM +0200, Michal Hocko wrote:
> > > Even for userland tasks, try_to_freeze() can currently be anywhere in
> > > the kernel. The frequently used ones are few but there are some odd
> >
> > I always thought that user space tasks can be in the fridge only on the
> > way out from the kernel (get_signal_to_deliver). I have quickly greped
>
> It *can* be anywhere. We used to have some deep in nfs. They got
> removed later due to deadlocks but in theory they still can be
> anywhere.

Well, it would be good to determine the difference between theory and practice
in this particular respect, because if in practice it can't be anywhere,
we can just set an "every new instance of try_to_freeze() has to be documented"
rule (which may not be a bad idea anyway) and disallow people to break things.

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/