Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754171AbdCIJQd (ORCPT ); Thu, 9 Mar 2017 04:16:33 -0500 Received: from mx2.suse.de ([195.135.220.15]:45455 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752808AbdCIJQb (ORCPT ); Thu, 9 Mar 2017 04:16:31 -0500 Date: Thu, 9 Mar 2017 10:16:28 +0100 From: Michal Hocko To: Christoph Hellwig Cc: linux-mm@kvack.org, Vlastimil Babka , Johannes Weiner , Mel Gorman , Andrew Morton , LKML , "Darrick J. Wong" Subject: Re: [RFC PATCH 3/4] xfs: map KM_MAYFAIL to __GFP_RETRY_MAYFAIL Message-ID: <20170309091628.GD11592@dhcp22.suse.cz> References: <20170307154843.32516-1-mhocko@kernel.org> <20170307154843.32516-4-mhocko@kernel.org> <20170308150659.GA24535@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170308150659.GA24535@infradead.org> 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 Content-Length: 1071 Lines: 24 On Wed 08-03-17 07:06:59, Christoph Hellwig wrote: > On Tue, Mar 07, 2017 at 04:48:42PM +0100, Michal Hocko wrote: > > From: Michal Hocko > > > > KM_MAYFAIL didn't have any suitable GFP_FOO counterpart until recently > > so it relied on the default page allocator behavior for the given set > > of flags. This means that small allocations actually never failed. > > > > Now that we have __GFP_RETRY_MAYFAIL flag which works independently on the > > allocation request size we can map KM_MAYFAIL to it. The allocator will > > try as hard as it can to fulfill the request but fails eventually if > > the progress cannot be made. > > I don't think we really need this - KM_MAYFAIL is basically just > a flag to not require the retry loop around kmalloc for those places > in XFS that can deal with allocation failures. But if the default > behavior is to not fail we'll happily take that. Does that mean that you are happy to go OOM and trigger the OOM killer even when you know that the failure can be handled gracefully? -- Michal Hocko SUSE Labs