Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 13 Nov 2002 20:30:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 13 Nov 2002 20:30:25 -0500 Received: from dp.samba.org ([66.70.73.150]:61317 "EHLO lists.samba.org") by vger.kernel.org with ESMTP id ; Wed, 13 Nov 2002 20:30:24 -0500 From: Rusty Russell To: Zwane Mwaikambo Cc: Linux Kernel , Linus Torvalds Subject: Re: [PATCH][2.5] smp_init 'CPUS done' looks strange In-reply-to: Your message of "Wed, 13 Nov 2002 08:22:28 CDT." Date: Thu, 14 Nov 2002 12:59:07 +1100 Message-Id: <20021114013718.0AE592C19D@lists.samba.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1290 Lines: 33 In message you write: > On Wed, 13 Nov 2002, Rusty Russell wrote: > > > In message > > you write: > > > Also, it would make sense in the future if smp_cpus_done actually gets a > > > value denoting how many cpus are online. > > > > No. Drop the prink by all means, but smp_cpus_done() can call > > num_online_cpus() itself. It can't know how many cpus the user > > specified, however. > > Doesn't that just encourage more (i = 0; i < NR_CPUS; i++) usage? If you > make max_cpus available to everyone, at least they'll have the correct cpu > count to check against. max_cpus is needed by more than bootup. 1) CPUs can be nonlinear. 2) They can bring CPUs up after boot. AM has some cpu iterator patches for those who really care about efficiently iterating over only online cpus, or only possible cpus. Hope that helps, Rusty. -- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/