This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH] Use macro to walk through online cpus

To: Amos Waterland <apw@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Use macro to walk through online cpus
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Tue, 22 Aug 2006 08:15:57 +0100
Cc: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Delivery-date: Tue, 22 Aug 2006 00:25:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060822031224.GA25123@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcbFus/yDmjMHDGuEduKVQANk04WTA==
Thread-topic: [Xen-devel] [PATCH] Use macro to walk through online cpus
User-agent: Microsoft-Entourage/

On 22/8/06 4:12 am, "Amos Waterland" <apw@xxxxxxxxxx> 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 <apw@xxxxxxxxxx>

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

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>