This patch is the core changes for memory fragmentation avoidance. __rmqueue() within an alloctype behaves much as it did before on the global list. If that alloctype has insufficient free blocks it trys to steal a unallocated 2^MAX_ORDER-1 block from another type. If there are no unallocated 2^MAX_ORDER-1 blocks it goes to a more aggressive fallback allocation detailed in a later patch. The other functions do basically the same thing they did before, they just get tidied up to deal with 3 alloctypes. As this patch replaces all references to free_area[] with free_area_lists[] it removes free_area[] Signed-off-by: Mel Gorman Signed-off-by: Joel Schopp