lkml.org 
[lkml]   [2010]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/5] use nr_cpus= to set nr_cpu_ids early


On Tue, 12 Jan 2010, Christoph Lameter wrote:
>
> Trouble is that NR_CPUS is used all over the place. If nr_cpu_ids <
> NR_CPUS at boot then there is a danger of for loops to NR_CPUS going out
> of bounds.
>
> CONFIG_NR_CPUS is used for various bitmaps so that seems to be okay.
>
> drivers/acpi/numa.c:acpi_numa_init probably should use nr_cpu_ids
> instead now.
>
> There is an octeon driver in staging that has some issues with NR_CPUS
> as well.

I suspect that this is the real reason for the current behavior of
'maxcpus=', and that if all of those issues get fixed we could probably
make maxcpus do what Yinghai's new 'nr_cpus=' does.

So in a perfect world, CONFIG_NR_CPUS's would never really be used, except
for some fundamental static allocations/limits that are too painful to try
to make dynamic.

I doubt that anybody really _cares_ about the "you can add them later"
behavior of the current maxcpus thing, and I suspect that the nr_cpus
semantics is what people generally would have expected.

Linus


\
 
 \ /
  Last update: 2010-01-12 22:01    [W:0.080 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site