[PATCH 05/05] mm GFP_ATOMIC comment

From: Paul Jackson (pj_at_sgi.com)
Date: 11/14/05

  • Next message: Ian Kent: "Re: [plug] smb client timeout problem - FIXED"
    Date:	Sun, 13 Nov 2005 20:04:15 -0800 (PST)
    To: akpm@osdl.org, linux-kernel@vger.kernel.org
    
    

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

    ---
     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 <pj@sgi.com> 1.650.933.1373
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Ian Kent: "Re: [plug] smb client timeout problem - FIXED"

    Relevant Pages