• Andrew Morton's avatar
    [PATCH] Simplify node/zone field in page->flags · 490d4075
    Andrew Morton authored
    From: Matthew Dobson <colpatch@us.ibm.com>
    
    This patch does the following:
    1) Rename ZONE_SHIFT to NODEZONE_SHIFT.  This value is the number
        of bits to shift page->flags to get the node/zone part of the
        bitfield.
    2) Add a macro called NODEZONE which takes a node number and zone number
        and returns a 'nodezone', a bitshifted composition of the two.
    3) Create page_zonenum & page_nodenum, inline functions to return the
        node/zone a page belongs to with some simple bit twiddling, no
        pointer dereferences necessary.
    4) Modify page_zone() and set_page_zone() to use the new NODEZONE_SHIFT.
    5) Modify memmap_init_zone() & free_area_init_core() to use the new
        NODEZONE macros.
    6) Fix up some comments to reflect the above changes.
    490d4075
page_alloc.c 40.7 KB