Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753100AbcK2Q5Y (ORCPT ); Tue, 29 Nov 2016 11:57:24 -0500 Received: from mx2.suse.de ([195.135.220.15]:55134 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751195AbcK2Q5M (ORCPT ); Tue, 29 Nov 2016 11:57:12 -0500 Subject: Re: [PATCH] block,blkcg: use __GFP_NOWARN for best-effort allocations in blkcg To: Tejun Heo , Michal Hocko References: <20161121154336.GD19750@merlins.org> <0d4939f3-869d-6fb8-0914-5f74172f8519@suse.cz> <20161121215639.GF13371@merlins.org> <20161121230332.GA3767@htj.duckdns.org> <7189b1f6-98c3-9a36-83c1-79f2ff4099af@suse.cz> <20161122164822.GA5459@htj.duckdns.org> <3e8eeadb-8dde-2313-f6e3-ef7763832104@suse.cz> <20161128171907.GA14754@htj.duckdns.org> <20161129072507.GA31671@dhcp22.suse.cz> <20161129163807.GB19454@htj.duckdns.org> Cc: Linus Torvalds , Jens Axboe , linux-mm , LKML , Joonsoo Kim , Marc MERLIN From: Vlastimil Babka Message-ID: Date: Tue, 29 Nov 2016 17:57:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20161129163807.GB19454@htj.duckdns.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1099 Lines: 24 On 11/29/2016 05:38 PM, Tejun Heo wrote: > On Tue, Nov 29, 2016 at 08:25:07AM +0100, Michal Hocko wrote: >> --- a/include/linux/gfp.h >> +++ b/include/linux/gfp.h >> @@ -246,7 +246,7 @@ struct vm_area_struct; >> #define GFP_ATOMIC (__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM) >> #define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS) >> #define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT) >> -#define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM) >> +#define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM|__GFP_NOWARN) >> #define GFP_NOIO (__GFP_RECLAIM) >> #define GFP_NOFS (__GFP_RECLAIM | __GFP_IO) >> #define GFP_TEMPORARY (__GFP_RECLAIM | __GFP_IO | __GFP_FS | \ >> >> this will not catch users who are doing gfp & ~__GFP_DIRECT_RECLAIM but >> I would rather not make warn_alloc() even more cluttered with checks. > > Yeah, FWIW, looks good to me. Me too. Just don't forget to update the comment describing GFP_NOWAIT and check the existing users if duplicite __GFP_NOWARN can be removed, and if they really want to be doing GFP_NOWAIT and not GFP_ATOMIC. Also dunno what about Tejun's eariler patch.