lkml.org 
[lkml]   [2009]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 1/3] page-allocator: Allow too high-order warning messages to be suppressed with __GFP_NOWARN
    Date
    > The page allocator warns once when an order >= MAX_ORDER is specified.
    > This is to catch callers of the allocator that are always falling back
    > to their worst-case when it was not expected. However, there are cases
    > where the caller is behaving correctly but cannot suppress the warning.
    > This patch allows the warning to be suppressed by the callers by
    > specifying __GFP_NOWARN.
    >
    > Signed-off-by: Mel Gorman <mel@csn.ul.ie>
    > ---
    > mm/page_alloc.c | 4 +++-
    > 1 files changed, 3 insertions(+), 1 deletions(-)
    >
    > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
    > index caa9268..b469a05 100644
    > --- a/mm/page_alloc.c
    > +++ b/mm/page_alloc.c
    > @@ -1740,8 +1740,10 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
    > * be using allocators in order of preference for an area that is
    > * too large.
    > */
    > - if (WARN_ON_ONCE(order >= MAX_ORDER))
    > + if (order >= MAX_ORDER) {
    > + WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
    > return NULL;
    > + }

    Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>




    \
     
     \ /
      Last update: 2009-07-16 03:05    [W:0.021 / U:122.280 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site