From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755605AbaIHXjk (ORCPT ); Mon, 8 Sep 2014 19:39:40 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:57814 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753827AbaIHXjj (ORCPT ); Mon, 8 Sep 2014 19:39:39 -0400 From: "Rafael J. Wysocki" To: Cong Wang Cc: Tejun Heo , LKML , David Rientjes , Michal Hocko , Andrew Morton Subject: Re: [Patch v4 1/2] freezer: check OOM kill while being frozen Date: Tue, 09 Sep 2014 01:59:06 +0200 Message-ID: <4394731.dfhKV5T3ox@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.16.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1409869842-10807-1-git-send-email-xiyou.wangcong@gmail.com> <4809128.C6aPga5IjQ@vostro.rjw.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, September 08, 2014 04:29:24 PM Cong Wang wrote: > On Mon, Sep 8, 2014 at 4:42 PM, Rafael J. Wysocki wrote: > > On Monday, September 08, 2014 04:16:15 PM Cong Wang wrote: > >> On Mon, Sep 8, 2014 at 4:23 PM, Rafael J. Wysocki wrote: > >> > > >> > The reason why it matters for the suspend-time freezing is that we freeze tasks > >> > to take them out of the picture entirely until they are thawed. Therefore we > >> > can't allow them to go back to the picture just for a while until they are > >> > killed. Frozen tasks are not supposed to get back to the picture at all. > >> > > >> > >> > >> Ok, then checking TIF_MEMDIE is unsafe for PM freeze, we should > >> keep the cgroup_freezing() test to make sure freeze request is from > >> cgroup not PM. Question got answered. :) > > > > Do I think correctly that cgroups freezing and system suspend are > > mutually exclusive? If not, then this still is problematic. > > Good point! Although rare, but it is possible we freeze a process both from > cgroup and PM. Hmm, this means we have to explicitly exclude PM rather > just checking cgroup freeze? There's no way to do that currently as PM freezing is all-inclusive. > Interesting, but I am not familiar with PM. I'm wondering if the OOM killer might avoid killing frozen tasks instead? Or there might be a "suspend" operation for the OOM killer that would be run from a PM notifier to guaratee that the OOM killer would not mess up with things during the entire system suspend (which surely is not quite useful anyway). -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.