[lkml]   [2012]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 07/17] mm: Ignore mempolicies when using ALLOC_NO_WATERMARK
    The reserve is proportionally distributed over all !highmem zones
    in the system. So we need to allow an emergency allocation access to
    all zones. In order to do that we need to break out of any mempolicy
    boundaries we might have.

    In my opinion that does not break mempolicies as those are user
    oriented and not system oriented. That is, system allocations are
    not guaranteed to be within mempolicy boundaries. For instance IRQs
    do not even have a mempolicy.

    So breaking out of mempolicy boundaries for 'rare' emergency
    allocations, which are always system allocations (as opposed to user)
    is ok.

    Signed-off-by: Peter Zijlstra <>
    Signed-off-by: Mel Gorman <>
    mm/page_alloc.c | 7 +++++++
    1 file changed, 7 insertions(+)

    diff --git a/mm/page_alloc.c b/mm/page_alloc.c
    index 363ca90..e225a7c 100644
    --- a/mm/page_alloc.c
    +++ b/mm/page_alloc.c
    @@ -2293,6 +2293,13 @@ rebalance:

    /* Allocate without watermarks if the context allows */
    if (alloc_flags & ALLOC_NO_WATERMARKS) {
    + /*
    + * Ignore mempolicies if ALLOC_NO_WATERMARKS on the grounds
    + * the allocation is high priority and these type of
    + * allocations are system rather than user orientated
    + */
    + zonelist = node_zonelist(numa_node_id(), gfp_mask);
    page = __alloc_pages_high_priority(gfp_mask, order,
    zonelist, high_zoneidx, nodemask,
    preferred_zone, migratetype);

     \ /
      Last update: 2012-05-10 16:21    [W:0.041 / U:192.052 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site