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

From: Michal Hocko
Date: Wed Sep 10 2014 - 09:24:38 EST


On Tue 09-09-14 22:53:32, Rafael J. Wysocki wrote:
> 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.

What do you think about this way to help distinguish kernel threads and
user processes and keep the future maintenance of freezer saner?
---