]> git.hungrycats.org Git - linux/commit
[PATCH] Simplify node/zone field in page->flags
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 13:10:30 +0000 (05:10 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 13:10:30 +0000 (05:10 -0800)
commit490d4075866f7991dea333e020415fcfaaf1da9f
tree191b487c7e04a55b414ffcedcc27f1e13690c9ca
parent4685ee17a6f79f5ba21098737df54174ef277589
[PATCH] Simplify node/zone field in page->flags

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.
include/linux/mm.h
include/linux/mmzone.h
mm/page_alloc.c