From: Paul Jackson Date: Wed, 11 Jan 2006 20:17:19 +0000 (-0800) Subject: [PATCH] mm: gfp_atomic comments X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4eac915d02453e81a32595cd7423492c81337a26;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] mm: gfp_atomic comments Clarify in comments that GFP_ATOMIC means both "don't sleep" and "use emergency pools", hence both ALLOC_HARDER and ALLOC_HIGH. Signed-off-by: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 8b2eab90abb6..da7ce8730e97 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -57,6 +57,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_HIGH) #define GFP_NOIO (__GFP_WAIT) #define GFP_NOFS (__GFP_WAIT | __GFP_IO) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ce991b173aa9..d41a0662d4da 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -931,7 +931,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. + * policy or is asking for __GFP_HIGH memory. GFP_ATOMIC requests will + * set both ALLOC_HARDER (!wait) and ALLOC_HIGH (__GFP_HIGH). */ alloc_flags = ALLOC_WMARK_MIN; if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait)