[haiku-development] Re: SMP: Is MAX_BOOT_CPUS 4 restriction intentional?

  • From: "Michael Lotz" <mmlr@xxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 28 Sep 2009 14:14:10

>
> On Mon, 28 Sep 2009 14:49:06 +0200 CEST, "François Revol" wrote:
> >> I have increased MAX_BOOT_CPUS to 8 and completely rebuild the
> > > Haiku
> >> installation. This version of Haiku goes to boot until the last
> > > (the
> >> "Rocket") icon and freeze without go to blue desktop. After that I
> >> have activated on-screen debugging and saw that all stopped with
> > > log
> >> message
> >> "Not possible to start debugger. The message: "tid < MAX HEAPS". I
> >> think the following assert was occured but was not handled:
> >
> > Likely MAX_HEAPS is 4 as well somewhere ?
> > src/system/libroot/posix/malloc/heap.h:
> >    enum { MAX_HEAPS = B_MAX_CPU_COUNT };
> >
> > hmm it should be 8 then..
>
> headers/build/os/kernel/OS.h has
>
> #define B_MAX_CPU_COUNT       8

I thought the comment above the assert stated "cpu count times two", so
it'd end up at 16 for 8 cores. The assert looks a bit strange in any
case. Taking a thread id and applying a CPU mask? Sounds worth
investigating.

I don't think there's a problem with enabling more CPUs in the
bootloader. It is mostly a space concern regarding the size of the
kernel args structure. In general it would make sense to move the whole
SMP setup from the bootloader into the kernel so this kind of data
passing doesn't need to take place. The bootloader should really only
decide the boot volume and the safemode options.

Regards
Michael

Other related posts: