RE: [Lhms-devel] Re: [Lhns-devel] Merging Nonlinear and Numa style memory hotplug

From: Shai Fultheim
Date: Thu Jun 24 2004 - 23:52:34 EST


> From: linux-kernel-owner@xxxxxxxxxxxxxxx [mailto:linux-kernel-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Yasunori Goto
> Sent: Thursday, June 24, 2004 15:20
> To: Dave Hansen
>
> > Some more comments on the first patch:

> > + for(i = 0; i < numnodes; i++) {
> > + if (!NODE_DATA(i))
> > + continue;
> > + pgdat = NODE_DATA(i);
> > + size = pgdat->node_zones[ZONE_HIGHMEM].present_pages;
> > + if (!size)
> > + continue;
> > + hsp = pgdat->node_zones[ZONE_HIGHMEM].zone_mem_map;
> > + if (hsp)
> > + break;
> > + }
> >
> > Doesn't this just find the lowest-numbered node's highmem? Are you sure
> > that no NUMA systems have memory at lower physical addresses on
> > higher-numbered nodes? I'm not sure that this is true.

In addition I'm involved in a NUMA-related project that might have
zone-normal on other nodes beside node0. I also think that in some cases it
might be useful to have the code above and below in case of AMD machines
that have less than 1GB per processor (or at least less than 1GB on the
FIRST processor).

> > +
> > +#ifdef CONFIG_HOTPLUG_MEMORY_OF_NODE
> > + for (nid = 0; nid < numnodes; nid++){
> > + int start, end;
> > +
> > + if ( !node_online(nid))
> > + continue;
> > + if ( node_start_pfn[nid] >= max_low_pfn )
> > + break;
> > +
> > + start = node_start_pfn[nid];
> > + end = ( node_end_pfn[nid] < max_low_pfn) ?
> > + node_end_pfn[nid] : max_low_pfn;
> > +
> > + for ( tmp = start; tmp < end; tmp++)
> > + /*
> > + * Only count reserved RAM pages
> > + */
> > + if (page_is_ram(tmp) &&
> PageReserved(pfn_to_page(tmp)))
> > + reservedpages++;
> > + }
> > +#else
> >
> > Again, I don't see what this loop is used for. You appear to be trying
> > to detect which nodes have lowmem. Is there currently any x86 NUMA
> > architecture that has lowmem on any node but node 0?
> >
> >
> >
> > -- Dave

As noted above, this is possible, the cost of this code is not much, so I
would keep it in.

--shai

-
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/