From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932517AbcFJKMv (ORCPT ); Fri, 10 Jun 2016 06:12:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:36248 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932296AbcFJKMs (ORCPT ); Fri, 10 Jun 2016 06:12:48 -0400 Subject: Re: [PATCH] mm, slaub: Add __GFP_ATOMIC to the GFP reclaim mask To: Mel Gorman , Andrew Morton References: <20160610093832.GK2527@techsingularity.net> Cc: Marcin Wojtas , linux-mm@kvack.org, linux-kernel@vger.kernel.org From: Vlastimil Babka Message-ID: <575A929D.3070601@suse.cz> Date: Fri, 10 Jun 2016 12:12:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <20160610093832.GK2527@techsingularity.net> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/10/2016 11:38 AM, Mel Gorman wrote: > Commit d0164adc89f6 ("mm, page_alloc: distinguish between being unable to > sleep, unwilling to sleep and avoiding waking kswapd") modified __GFP_WAIT > to explicitly identify the difference between atomic callers and those that > were unwilling to sleep. Later the definition was removed entirely. > > The GFP_RECLAIM_MASK is the set of flags that affect watermark checking > and reclaim behaviour but __GFP_ATOMIC was never added. Without it, atomic > users of the slab allocator strip the __GFP_ATOMIC flag and cannot access > the page allocator atomic reserves. This patch addresses the problem. > > The user-visible impact depends on the workload but potentially atomic > allocations unnecessarily fail without this path. > > Cc: # 4.4+ > Reported-by: Marcin Wojtas > Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka > --- > mm/internal.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/mm/internal.h b/mm/internal.h > index a37e5b6f9d25..2524ec880e24 100644 > --- a/mm/internal.h > +++ b/mm/internal.h > @@ -24,7 +24,8 @@ > */ > #define GFP_RECLAIM_MASK (__GFP_RECLAIM|__GFP_HIGH|__GFP_IO|__GFP_FS|\ > __GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|\ > - __GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC) > + __GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC|\ > + __GFP_ATOMIC) > > /* The GFP flags allowed during early boot */ > #define GFP_BOOT_MASK (__GFP_BITS_MASK & ~(__GFP_RECLAIM|__GFP_IO|__GFP_FS)) >