From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 13 Nov 2005 20:04:15 -0800 (PST) From: Paul Jackson Message-Id: <20051114040415.13951.86293.sendpatchset@jackhammer.engr.sgi.com> In-Reply-To: <20051114040329.13951.39891.sendpatchset@jackhammer.engr.sgi.com> References: <20051114040329.13951.39891.sendpatchset@jackhammer.engr.sgi.com> Subject: [PATCH 05/05] mm GFP_ATOMIC comment Sender: owner-linux-mm@kvack.org Return-Path: To: akpm@osdl.org, linux-kernel@vger.kernel.org Cc: Nick Piggin , linux-mm@kvack.org, Simon Derr , Christoph Lameter , "Rohit, Seth" , Paul Jackson List-ID: Clarify in comments that GFP_ATOMIC means both "don't sleep" and "use emergency pools", hence both ALLOC_DIP_ALOT and ALLOC_DIP_SOME. Signed-off-by: Paul Jackson --- include/linux/gfp.h | 1 + mm/page_alloc.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) --- 2.6.14-mm2.orig/include/linux/gfp.h 2005-11-13 09:57:03.317369370 -0800 +++ 2.6.14-mm2/include/linux/gfp.h 2005-11-13 10:31:05.590802684 -0800 @@ -58,6 +58,7 @@ struct vm_area_struct; __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ __GFP_NOMEMALLOC|__GFP_HARDWALL) +/* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ #define GFP_ATOMIC (__GFP_VALID | __GFP_HIGH) #define GFP_NOIO (__GFP_VALID | __GFP_WAIT) #define GFP_NOFS (__GFP_VALID | __GFP_WAIT | __GFP_IO) --- 2.6.14-mm2.orig/mm/page_alloc.c 2005-11-13 10:21:13.804965981 -0800 +++ 2.6.14-mm2/mm/page_alloc.c 2005-11-13 10:32:33.090792563 -0800 @@ -926,7 +926,8 @@ restart: * * The caller may dip into page reserves a bit more if the caller * cannot run direct reclaim, or if the caller has realtime scheduling - * policy or is asking for __GFP_HIGH memory. + * policy or is asking for __GFP_HIGH memory. GFP_ATOMIC requests will + * set both ALLOC_DIP_ALOT (!wait) and ALLOC_DIP_SOME (__GFP_HIGH). */ alloc_flags = 0; if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait) -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson 1.650.933.1373 -- 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