lkml.org 
[lkml]   [2006]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] percpu data: only iterate over possible CPUs
On Tue, Feb 07, 2006 at 09:48:41AM -0800, Linus Torvalds wrote:
>
>
> On Tue, 7 Feb 2006, Andrew Morton wrote:
> >
> > This one:
> >
> > --- devel/fs/file.c~reduce-size-of-percpudata-and-make-sure-per_cpuobject 2006-02-04 23:27:17.000000000 -0800
> > +++ devel-akpm/fs/file.c 2006-02-04 23:27:17.000000000 -0800
> > @@ -379,7 +379,6 @@ static void __devinit fdtable_defer_list
> > void __init files_defer_init(void)
> > {
> > int i;
> > - /* Really early - can't use for_each_cpu */
> > - for (i = 0; i < NR_CPUS; i++)
> > + for_each_cpu(i)
> > fdtable_defer_list_init(i);
> > }
> >
> > And yes, me too - when I saw that comment disappear I checked and decided
> > that the comment was both wrong and undesirable.
>
> Ahh, yes. The comment is totally incorrect, we must have done the CPU
> setup much too later a long long time ago ;)

One would think so, but I recall not all archs did that. Alpha for
example sets up cpu_possible_map in smp_prepare_cpus(). It however
makes more sense to fix the arch then use NR_CPUS, IMO.

Thanks
Dipankar
-
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: 2006-02-07 19:33    [W:2.812 / U:0.220 seconds]
©2003-2011 Jasper Spaans. Advertise on this site