From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753152AbaJQCdl (ORCPT ); Thu, 16 Oct 2014 22:33:41 -0400 Received: from mail-oi0-f53.google.com ([209.85.218.53]:56280 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751643AbaJQCdk (ORCPT ); Thu, 16 Oct 2014 22:33:40 -0400 MIME-Version: 1.0 In-Reply-To: <20141016222237.GA30063@redhat.com> References: <20141016203954.GA26336@redhat.com> <20141016211136.GA27468@redhat.com> <20141016213512.GA28099@redhat.com> <20141016222237.GA30063@redhat.com> Date: Thu, 16 Oct 2014 19:33:39 -0700 Message-ID: Subject: Re: + freezer-check-oom-kill-while-being-frozen.patch added to -mm tree From: Cong Wang To: Oleg Nesterov Cc: Michal Hocko , David Rientjes , "Rafael J. Wysocki" , Tejun Heo , Andrew Morton , LKML 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 Thu, Oct 16, 2014 at 3:22 PM, Oleg Nesterov wrote: > On 10/16, Cong Wang wrote: >> >> On Thu, Oct 16, 2014 at 2:35 PM, Oleg Nesterov wrote: >> > >> > If a task B is already frozen, it sleeps in D state. >> > >> > If OOM selects B as a victim after that, it won't be woken by >> > SIGKILL, thus it obviously can't call should_thaw_current() and >> > notice TIF_MEMDIE. >> >> I see your point now, it would be more clear if you can just quote >> the patch instead of changelog. >> >> So are you saying the loop in __refrigerator() is useless? > > No. > >> Since >> it will always stay in asleep after schedule()? > > Not always. But it will stay asleep in this particular case. Hmm, so we still need to wake it up in oom killer: if (test_tsk_thread_flag(task, TIF_MEMDIE)) { if (unlikely(frozen(task))) wake_up_state(task, TASK_UNINTERRUPTIBLE); I will update the patch if Michal doesn't.