RE: Hugepages demand paging V1 [4/4]: Numa patch

From: Chen, Kenneth W
Date: Wed Oct 27 2004 - 16:02:57 EST


On Mon, 25 Oct 2004, Chen, Kenneth W wrote:
> > @@ -32,14 +32,17 @@
> > + struct zonelist *zonelist = NODE_DATA(nid)->node_zonelists;
> > + struct zone **zones = zonelist->zones;
> > + struct zone *z;
> > + int i;
> > +
> > + for(i=0; (z = zones[i])!= NULL; i++) {
> > + nid = z->zone_pgdat->node_id;
> > + if (list_empty(&hugepage_freelists[node_id]))
> > + break;
> > }
>
> Also this is generic code, we should consider scanning ZONE_HIGHMEM
> zonelist. Otherwise, this will likely screw up x86 numa machine.

Christoph Lameter wrote on Wednesday, October 27, 2004 10:57 AM
> The highmem zones are included in the zones[] array AFAIK.


node_zonelists is an array in the struct pglist_data. In your patch,
you are referencing the first element in that array, which has a zone
list for all node memory in normal zone.

What will happen for a x86 numa box with highmem only on some nodes?

- Ken


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/