From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755350AbaKEQ3h (ORCPT ); Wed, 5 Nov 2014 11:29:37 -0500 Received: from mail-qc0-f170.google.com ([209.85.216.170]:34612 "EHLO mail-qc0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755329AbaKEQ3d (ORCPT ); Wed, 5 Nov 2014 11:29:33 -0500 Date: Wed, 5 Nov 2014 11:29:29 -0500 From: Tejun Heo To: Michal Hocko Cc: "Rafael J. Wysocki" , Andrew Morton , Cong Wang , David Rientjes , Oleg Nesterov , LKML , linux-mm@kvack.org, Linux PM list Subject: Re: [PATCH 3/4] OOM, PM: OOM killed task shouldn't escape PM suspend Message-ID: <20141105162929.GD14386@htj.dyndns.org> References: <20141021141159.GE9415@dhcp22.suse.cz> <4766859.KSKPTm3b0x@vostro.rjw.lan> <20141021142939.GG9415@dhcp22.suse.cz> <20141104192705.GA22163@htj.dyndns.org> <20141105124620.GB4527@dhcp22.suse.cz> <20141105130247.GA14386@htj.dyndns.org> <20141105133100.GC4527@dhcp22.suse.cz> <20141105134219.GD4527@dhcp22.suse.cz> <20141105154436.GB14386@htj.dyndns.org> <20141105160115.GA28226@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141105160115.GA28226@dhcp22.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Michal. On Wed, Nov 05, 2014 at 05:01:15PM +0100, Michal Hocko wrote: > I am not sure I am following. With the latest patch OOM path is no > longer blocked by the PM (aka oom_killer_disable()). Allocations simply > fail if the read_trylock fails. > oom_killer_disable is moved before tasks are frozen and it will wait for > all on-going OOM killers on the write lock. OOM killer is enabled again > on the resume path. Sure, but why are we exposing new interfaces? Can't we just make oom_killer_disable() first set the disable flag and wait for the on-going ones to finish (and make the function fail if it gets chosen as an OOM victim)? It's weird to expose extra stuff on top. Why are we doing that? Thanks. -- tejun