From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by kanga.kvack.org (Postfix) with ESMTP id CA8B96B0037 for ; Thu, 12 Dec 2013 13:00:48 -0500 (EST) Received: by mail-ie0-f178.google.com with SMTP id lx4so1123586iec.23 for ; Thu, 12 Dec 2013 10:00:48 -0800 (PST) Date: Thu, 12 Dec 2013 12:00:44 -0600 From: Alex Thorlton Subject: [RFC PATCH 1/3] Add flags for temporary compound pages Message-ID: <20131212180044.GB134240@sgi.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: Andrew Morton , "Kirill A. Shutemov" , Benjamin Herrenschmidt , Rik van Riel , Wanpeng Li , Mel Gorman , Michel Lespinasse , Benjamin LaHaise , Oleg Nesterov , "Eric W. Biederman" , Andy Lutomirski , Al Viro , David Rientjes , Zhang Yanfei , Peter Zijlstra , Johannes Weiner , Michal Hocko , Jiang Liu , Cody P Schafer , Glauber Costa , Kamezawa Hiroyuki , Naoya Horiguchi , linux-kernel@vger.kernel.org This chunk of the patch just adds the necessary page flags to support what I call a temporary compound page. Temporary compound pages provide us with the ability to turn a chunk of pages into a proper THP at some point after pulling them off the free list, but also allow us to fault in single 4K pages from the chunk. Signed-off-by: Alex Thorlton Cc: Andrew Morton Cc: Nate Zimmer Cc: Cliff Wickman Cc: "Kirill A. Shutemov" Cc: Benjamin Herrenschmidt Cc: Rik van Riel Cc: Wanpeng Li Cc: Mel Gorman Cc: Michel Lespinasse Cc: Benjamin LaHaise Cc: Oleg Nesterov Cc: "Eric W. Biederman" Cc: Andy Lutomirski Cc: Al Viro Cc: David Rientjes Cc: Zhang Yanfei Cc: Peter Zijlstra Cc: Johannes Weiner Cc: Michal Hocko Cc: Jiang Liu Cc: Cody P Schafer Cc: Glauber Costa Cc: Kamezawa Hiroyuki Cc: David Rientjes Cc: Naoya Horiguchi Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org --- include/linux/gfp.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 9b4dd49..6ec63dd 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -35,6 +35,7 @@ struct vm_area_struct; #define ___GFP_NO_KSWAPD 0x400000u #define ___GFP_OTHER_NODE 0x800000u #define ___GFP_WRITE 0x1000000u +#define ___GFP_COMP_TEMP 0x2000000u /* If the above are modified, __GFP_BITS_SHIFT may need updating */ /* @@ -77,6 +78,7 @@ struct vm_area_struct; #define __GFP_NORETRY ((__force gfp_t)___GFP_NORETRY) /* See above */ #define __GFP_MEMALLOC ((__force gfp_t)___GFP_MEMALLOC)/* Allow access to emergency reserves */ #define __GFP_COMP ((__force gfp_t)___GFP_COMP) /* Add compound page metadata */ +#define __GFP_COMP_TEMP ((__force gfp_t)___GFP_COMP_TEMP) /* Treat as temp compound page */ #define __GFP_ZERO ((__force gfp_t)___GFP_ZERO) /* Return zeroed page on success */ #define __GFP_NOMEMALLOC ((__force gfp_t)___GFP_NOMEMALLOC) /* Don't use emergency reserves. * This takes precedence over the @@ -121,6 +123,9 @@ struct vm_area_struct; #define GFP_TRANSHUGE (GFP_HIGHUSER_MOVABLE | __GFP_COMP | \ __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN | \ __GFP_NO_KSWAPD) +#define GFP_TEMP_TRANSHUGE (GFP_HIGHUSER_MOVABLE | __GFP_COMP_TEMP | \ + __GFP_NOMEMALLOC | __GFP_NORETRY | \ + __GFP_NOWARN | __GFP_NO_KSWAPD) #ifdef CONFIG_NUMA #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) -- 1.7.12.4 -- 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