From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752197AbcEMIXh (ORCPT ); Fri, 13 May 2016 04:23:37 -0400 Received: from mx2.suse.de ([195.135.220.15]:39257 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752031AbcEMIXf (ORCPT ); Fri, 13 May 2016 04:23:35 -0400 Subject: Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations To: Michal Hocko References: <1462865763-22084-1-git-send-email-vbabka@suse.cz> <1462865763-22084-7-git-send-email-vbabka@suse.cz> <20160512162043.GA4261@dhcp22.suse.cz> Cc: linux-mm@kvack.org, Andrew Morton , Joonsoo Kim , Rik van Riel , David Rientjes , Mel Gorman , Johannes Weiner , Tetsuo Handa , linux-kernel@vger.kernel.org, Linus Torvalds From: Vlastimil Babka Message-ID: <57358F03.5080707@suse.cz> Date: Fri, 13 May 2016 10:23:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160512162043.GA4261@dhcp22.suse.cz> 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 On 05/12/2016 06:20 PM, Michal Hocko wrote: > On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: > [...] >> diff --git a/include/linux/gfp.h b/include/linux/gfp.h >> index 570383a41853..0cb09714d960 100644 >> --- a/include/linux/gfp.h >> +++ b/include/linux/gfp.h >> @@ -256,8 +256,7 @@ struct vm_area_struct; >> #define GFP_HIGHUSER (GFP_USER | __GFP_HIGHMEM) >> #define GFP_HIGHUSER_MOVABLE (GFP_HIGHUSER | __GFP_MOVABLE) >> #define GFP_TRANSHUGE ((GFP_HIGHUSER_MOVABLE | __GFP_COMP | \ >> - __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN) & \ >> - ~__GFP_RECLAIM) >> + __GFP_NOMEMALLOC | __GFP_NOWARN) & ~__GFP_RECLAIM) > > I am not sure this is the right thing to do. I think we should keep > __GFP_NORETRY and clear it where we want a stronger semantic. This is > just too suble that all callsites are doing the right thing. That would complicate alloc_hugepage_direct_gfpmask() a bit, but if you think it's worth it, I can turn the default around, OK.