Re: [RFC] [PATCH] Power Managed memory base enabling

David Rientjes
2007-03-09T21:27:36Z

On Fri, 9 Mar 2007, Mark Gross wrote:

> +int __nearest_non_pm_node(int nid)
> +{
> + int i, dist, closest, temp;
> +
> + if (!__power_managed_node(nid))
> + return nid;
> + dist = closest= 255;
> + for_each_node(i) {

Shouldn't this be for_each_online_node(i) ?

> + if (__power_managed_node(i))
> + continue;
> +
> + if (i != nid) {
> + temp = __node_distance(nid, i );
> + if (temp < dist) {
> + closest = i;
> + dist = temp;
> + }
> + }
> + }
> + BUG_ON(closest == 255);
> + return closest;
> +}