From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932261AbcLLIw7 (ORCPT ); Mon, 12 Dec 2016 03:52:59 -0500 Received: from mail-wj0-f194.google.com ([209.85.210.194]:35732 "EHLO mail-wj0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbcLLIw5 (ORCPT ); Mon, 12 Dec 2016 03:52:57 -0500 Date: Mon, 12 Dec 2016 09:52:55 +0100 From: Michal Hocko To: Tetsuo Handa Cc: akpm@linux-foundation.org, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@suse.de, rientjes@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically Message-ID: <20161212085254.GC18163@dhcp22.suse.cz> References: <201612061938.DDD73970.QFHOFJStFOLVOM@I-love.SAKURA.ne.jp> <20161206192242.GA10273@dhcp22.suse.cz> <201612082153.BHC81241.VtMFFHOLJOOFSQ@I-love.SAKURA.ne.jp> <20161208134718.GC26530@dhcp22.suse.cz> <201612112023.HBB57332.QOFFtJLOOMFSVH@I-love.SAKURA.ne.jp> <201612112253.GGH60933.tOMHJQOFSOFFVL@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201612112253.GGH60933.tOMHJQOFSOFFVL@I-love.SAKURA.ne.jp> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 11-12-16 22:53:55, Tetsuo Handa wrote: > Tetsuo Handa wrote: > > Michal Hocko wrote: > > > On Thu 08-12-16 21:53:44, Tetsuo Handa wrote: > > > > If we could agree > > > > with calling __alloc_pages_nowmark() before out_of_memory() if __GFP_NOFAIL > > > > is given, we can avoid locking up while minimizing possibility of invoking > > > > the OOM killer... > > > > > > I do not understand. We do __alloc_pages_nowmark even when oom is called > > > for GFP_NOFAIL. > > > > Where is that? I can find __alloc_pages_nowmark() after out_of_memory() > > if __GFP_NOFAIL is given, but I can't find __alloc_pages_nowmark() before > > out_of_memory() if __GFP_NOFAIL is given. > > > > What I mean is below patch folded into > > "[PATCH 1/2] mm: consolidate GFP_NOFAIL checks in the allocator slowpath". > > > Oops, I wrongly implemented "__alloc_pages_nowmark() before out_of_memory() if > __GFP_NOFAIL is given." case. Updated version is shown below. If you want to introduce such a change then make sure to justify it properly in the changelog. I will not comment on this change here because I believe it is not directly needed for neither of the two patches. -- Michal Hocko SUSE Labs