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

Shai Fultheim
2004-06-25T04:50:39Z

> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
> owner@vger.kernel.org] 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