Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751856AbdCHPHa (ORCPT ); Wed, 8 Mar 2017 10:07:30 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:39496 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751633AbdCHPH1 (ORCPT ); Wed, 8 Mar 2017 10:07:27 -0500 Date: Wed, 8 Mar 2017 07:06:59 -0800 From: Christoph Hellwig To: Michal Hocko Cc: linux-mm@kvack.org, Vlastimil Babka , Johannes Weiner , Mel Gorman , Andrew Morton , LKML , Michal Hocko , "Darrick J. Wong" Subject: Re: [RFC PATCH 3/4] xfs: map KM_MAYFAIL to __GFP_RETRY_MAYFAIL Message-ID: <20170308150659.GA24535@infradead.org> References: <20170307154843.32516-1-mhocko@kernel.org> <20170307154843.32516-4-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170307154843.32516-4-mhocko@kernel.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 825 Lines: 16 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.