From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Gross Subject: Re: [RFC] [PATCH] Power Managed memory base enabling Date: Fri, 9 Mar 2007 13:26:28 -0800 Message-ID: <20070309212628.GA18223@linux.intel.com> References: <20070305181826.GA21515@linux.intel.com> <20070306164722.GB22725@linux.intel.com> <20070309205344.GA16777@linux.intel.com> Reply-To: mgross@linux.intel.com Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.osdl.org Errors-To: linux-pm-bounces@lists.osdl.org To: David Rientjes Cc: linux-mm@kvack.org, mark.gross@intel.com, linux-pm@lists.osdl.org, Andrew Morton , Linus Torvalds , neelam.chandwani@intel.com List-Id: linux-pm@vger.kernel.org On Fri, Mar 09, 2007 at 01:27:36PM -0800, David Rientjes wrote: > 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 =3D closest=3D 255; > > + for_each_node(i) { > = > Shouldn't this be for_each_online_node(i) ? yes. thanks, = --mgross > = > > + if (__power_managed_node(i)) > > + continue; > > + > > + if (i !=3D nid) { > > + temp =3D __node_distance(nid, i ); > > + if (temp < dist) { > > + closest =3D i; > > + dist =3D temp; > > + } > > + } > > + } > > + BUG_ON(closest =3D=3D 255); > > + return closest; > > +}