Assertion in pcpu_init

Marcel Moolenaar xcllnt at mac.com
Fri Nov 27 18:07:32 UTC 2009


On Nov 27, 2009, at 2:04 AM, Marc Loerner wrote:

> Hello Marcel + list,
> I tried to boot up the new 8.0-RELEASE disc1 iso and ran into assertion
> in pcpu_init (cpuid < MAXCPU).
> On my machine/kernel I have 2x4 cores and MAXCPU is set to 4,
> so on probing processors in ia64_probe_sapics in madt.c cpu_mp_add gets
> called more than MAXCPU-times. This leading to smp_cpus and cpuid in call
> of pcpu_init being greater than MAXCPU => Assertion
> 
> So solution would be either to modify MAXCPU and compile my own kernel
> or adding check on this in cpu_mp_add before calling pcpu_init.
> 
> BTW, is there a way to modify MAXCPU dynamically on boot?

Hi Marc,

Unfortunately, there's no way to change MAXCPU dynamically.  It's
primarily used to size arrays at compile-time.  The biggest problem
we currently have, and one that prevents us from defining MAXCPU as
64 or so, is that we allocate MAXCPU VHPT tables, each easily a few
dozen megabytes.

I'll see about allocating each VHPT table when the corresponding
CPU gets added. Related to this is that we currently size the VHPT
table based on the amount of physical memory. I don't think that's
optimal and it may be potentially harmful on machines with a huge
number of CPUs.

For now the workaround is to boot with SMP disabled and then build
a customer kernel with MAXCPU defined appropriately.

FYI,

-- 
Marcel Moolenaar
xcllnt at mac.com





More information about the freebsd-ia64 mailing list