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

  • From: Siarzhuk Zharski <zharik@xxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Mon, 28 Sep 2009 14:36:26 +0200

Hi All,

Some days ago we have a hardware update here. ;-) And now my working
station has "Intel(R) Core(TM)i7 CPU 920 @ 2,67 GHz" CPU inside and looks
like a machine with 8 CPUs. I tried to boot Haiku on this PC. In default
case Haiku freezed at early stage - there was a boot logo, all boot icons
were grayed and I have no possibility to open boot menu. It only possible
to boot either with "SMP off" boot option or with some CPU cores switched
off in BIOS. There were also some messages in the syslog about "maximal
count of CPU(4) reached". Well, I quickly browse through the source and
found the following define in

  17 // must match SMP_MAX_CPUS in arch_smp.h
  18 #define MAX_BOOT_CPUS 4

I have also found that headers/build/os/kernel/OS.h contains different
define for count of CPUs

 368 #if __INTEL__
 369 #       define B_MAX_CPU_COUNT  8
 370 #elif __POWERPC__
 371 #       define B_MAX_CPU_COUNT  8
 372 #endif

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:


 188 int
 189 processHeap::getHeapIndex(void)
 190 {
 191         // Here we use the number of processors as the maximum number
of heaps.
 192         // In fact, for efficiency, we just round up to the highest
power of two,
 193         // times two.
 194         int tid = find_thread(NULL) & _numProcessorsMask;
 195         assert(tid < MAX_HEAPS);
 196         return tid;
 197 }

And now I need some more suggestions from you how to debug this situation
and let Haiku boot with 8 CPUs. ;-) Thank you! 

Kind Regards,

Other related posts: