mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] mm gfp_atomic comments
@ 2006-01-11  3:22 Paul Jackson
  0 siblings, 0 replies; only message in thread
From: Paul Jackson @ 2006-01-11  3:22 UTC (permalink / raw)
  To: akpm
  Cc: Hugh Dickins, linux-kernel, Nick Piggin, Andi Kleen,
	Paul Jackson, Christoph Lameter

From: Paul Jackson <pj@sgi.com>

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 <pj@sgi.com>

---

This is the same patch that Andrew tried sending to Linus
on Jan 6, 2006, except that it has been fixed to refer to
ALLOC_HARDER and ALLOC_HIGH, instead of the other ALLOC_DIP_*
terms that were rejected.

 include/linux/gfp.h |    1 +
 mm/page_alloc.c     |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

--- 2.6.15-mm2.orig/include/linux/gfp.h	2006-01-10 13:39:35.831271898 -0800
+++ 2.6.15-mm2/include/linux/gfp.h	2006-01-10 13:59:44.175302966 -0800
@@ -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)
--- 2.6.15-mm2.orig/mm/page_alloc.c	2006-01-10 13:41:57.345486682 -0800
+++ 2.6.15-mm2/mm/page_alloc.c	2006-01-10 14:07:44.845490827 -0800
@@ -998,7 +998,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)

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-11  3:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-11  3:22 [PATCH v2] mm gfp_atomic comments Paul Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome