lkml.org 
[lkml]   [2002]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH][2.5] smp_init 'CPUS done' looks strange
Date
In message <Pine.LNX.4.44.0211130820410.24523-100000@montezuma.mastecende.com> 
you write:
> On Wed, 13 Nov 2002, Rusty Russell wrote:
>
> > In message <Pine.LNX.4.44.0211122246540.24523-100000@montezuma.mastecende.c
om>
> > 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/

\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.034 / U:2.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site