From: Keir Fraser Subject: Re: [PATCH] Use macro to walk through online cpus Date: Tue, 22 Aug 2006 08:15:57 +0100 Message-ID: References: <20060822031224.GA25123@kvasir.watson.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060822031224.GA25123@kvasir.watson.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Amos Waterland , xen-devel@lists.xensource.com Cc: Jimi Xenidis List-Id: xen-devel@lists.xenproject.org On 22/8/06 4:12 am, "Amos Waterland" wrote: > There are two cases that I know of in xen/common where we waste cycles > walking through a list from zero to NR_CPUS. This patch makes them use > for_each_online_cpu instead. > > Signed-off-by: Amos Waterland Better to use for_each_cpu() in case any arch supports CPU hotplug in future. The wasted cycles are unimportant since these loops run only once, at boot time. -- Keir