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

From: Tejun Heo
Date: Fri Sep 05 2014 - 10:08:29 EST


Hello,

On Thu, Sep 04, 2014 at 03:30:41PM -0700, Cong Wang wrote:
...
> Cc: David Rientjes <rientjes@xxxxxxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxx>
> Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>
> Cc: Tejun Heo <tj@xxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Acked-by: Michal Hocko <mhocko@xxxxxxx>
> Signed-off-by: Cong Wang <xiyou.wangcong@xxxxxxxxx>

Prolly should stable@xxxxxxxxxxxxxxx?

> +static bool should_thaw_current(bool check_kthr_stop)
> +{
> + if (!freezing(current))
> + return true;
> +
> + if (check_kthr_stop && kthread_should_stop())
> + return true;
> +
> + /* It might not be safe to check TIF_MEMDIE for pm freeze. */

This is just another representation of the following code which isn't
particularly useful. Wouldn't it be better if the comment actually
explains why this might not be safe?

> + if (cgroup_freezing(current) && test_thread_flag(TIF_MEMDIE))
> + return true;
> +
> + return false;
> +}

Other than that,

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun
--
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/