Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754188AbbKXJrS (ORCPT ); Tue, 24 Nov 2015 04:47:18 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:36606 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753601AbbKXJrL (ORCPT ); Tue, 24 Nov 2015 04:47:11 -0500 Date: Tue, 24 Nov 2015 10:47:09 +0100 From: Michal Hocko To: David Rientjes Cc: Vlastimil Babka , Andrew Morton , Johannes Weiner , Andrea Arcangeli , Mel Gorman , linux-mm@kvack.org, LKML Subject: Re: [PATCH] mm, oom: Give __GFP_NOFAIL allocations access to memory reserves Message-ID: <20151124094708.GA29472@dhcp22.suse.cz> References: <1447249697-13380-1-git-send-email-mhocko@kernel.org> <5651BB43.8030102@suse.cz> <20151123092925.GB21050@dhcp22.suse.cz> <5652DFCE.3010201@suse.cz> <20151123101345.GF21050@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2285 Lines: 51 On Mon 23-11-15 13:26:49, David Rientjes wrote: > On Mon, 23 Nov 2015, Michal Hocko wrote: [...] > > I am not sure I follow you here. The point of the warning is to warn > > when the oom killer is disbaled (out_of_memory returns false) _and_ the > > request is __GFP_NOFAIL because we simply cannot guarantee any forward > > progress and just a use of the allocation flag is not supproted. > > > > I don't think the WARN_ONCE() above is helpful for a few reasons: > > - it suggests that min_free_kbytes is the best way to work around such > issues and gives kernel developers a free pass to just say "raise > min_free_kbytes" rather than reducing their reliance on __GFP_NOFAIL, I disagree. Users are quite sensitive to warnings with backtraces in the log from my experience and they report them. And while the log shows the code path which triggers the issue which can help us to change the code it also gives a useful hint on how to reduce this issue until we are able to either fix a bug or a permanent configuration if we are not able to get rid of it for whatever reason. Besides that there is no other reliable warning that we are getting _really_ short on memory unlike when the allocation failure is allowed. OOM killer report might be missing because there was no actual killing happening. > - raising min_free_kbytes is not immediately actionable without memory > freeing to fix any oom issue, and true but it can be done to reduce chances for the issue to reappear. > - it relies on the earlier warning to dump the state of memory and > doesn't add any significant information to help understand how seperate > occurrences are similar or different. The information is quite valuable even without OOM killer report IMHO. > I think the WARN_ONCE() should just be removed. I do not insist on keeping it but I really think it might be useful while it doesn't seem to cause any confusion IMHO. So unless there is a strong reason to not include it I would prefer keeping it. -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/