From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752571AbbCOMN1 (ORCPT ); Sun, 15 Mar 2015 08:13:27 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:32938 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188AbbCOMNV (ORCPT ); Sun, 15 Mar 2015 08:13:21 -0400 Date: Sun, 15 Mar 2015 13:13:17 +0100 From: Michal Hocko To: Tetsuo Handa Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, david@fromorbit.com, mgorman@suse.de, riel@redhat.com, fengguang.wu@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] mm: Allow small allocations to fail Message-ID: <20150315121317.GA30685@dhcp22.suse.cz> References: <1426107294-21551-1-git-send-email-mhocko@suse.cz> <1426107294-21551-2-git-send-email-mhocko@suse.cz> <201503151443.CFE04129.MVFOOStLFHFOQJ@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503151443.CFE04129.MVFOOStLFHFOQJ@I-love.SAKURA.ne.jp> 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 On Sun 15-03-15 14:43:37, Tetsuo Handa wrote: [...] > If you want to count only those retries which involved OOM killer, you need > to do like > > - nr_retries++; > + if (gfp_mask & __GFP_FS) > + nr_retries++; > > in this patch. No, we shouldn't create another type of hidden NOFAIL allocation like this. I understand that the wording of the changelog might be confusing, though. It says: "This implementation counts only those retries which involved OOM killer because we do not want to be too eager to fail the request." Would it be more clear if I changed that to? "This implemetnation counts only those retries when the system is considered OOM because all previous reclaim attempts have resulted in no progress because we do not want to be too eager to fail the request." We definitely _want_ to fail GFP_NOFS allocations. -- Michal Hocko SUSE Labs