From mboxrd@z Thu Jan 1 00:00:00 1970 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 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f71.google.com (mail-pg0-f71.google.com [74.125.83.71]) by kanga.kvack.org (Postfix) with ESMTP id BF3A76B03D7 for ; Wed, 8 Mar 2017 10:07:01 -0500 (EST) Received: by mail-pg0-f71.google.com with SMTP id f21so61028078pgi.4 for ; Wed, 08 Mar 2017 07:07:01 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id u8si3535443plk.103.2017.03.08.07.07.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 07:07:00 -0800 (PST) Date: Wed, 8 Mar 2017 07:06:59 -0800 From: Christoph Hellwig 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> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Vlastimil Babka , Johannes Weiner , Mel Gorman , Andrew Morton , LKML , Michal Hocko , "Darrick J. Wong" 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. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org