There is a problem with the current __alloc pages on a machine with many
nodes. As we go down the zones list, we may move onto other nodes.
Each time we go to the next zone we protect these zones by doing
"min += local_low".
This is quite appropriate on a machine with one node, but wrong on
machines with other nodes. To illustrate, here is an example. On a
256 node Altix machine, a request on node 0 for 2MB requires just over
600MB of free memory on the 256th node in order to fullfil the "min"
requirements if all other nodes are low on memory. This could leave
73GB of memory unallocated across all nodes.
This patch keeps the same semantics for lower_zone_protection, but only
provides protection for higher priority zones in the same node.
The patch seems to do the right thing on my non-NUMA zx1 ia64 machine
(which has ZONE_DMA and ZONE_NORMAL) as well as the multi-node Altix.