Montecito running and little SMP-bug

Marc Lörner marc.loerner at hob.de
Thu Sep 18 09:55:49 UTC 2008


On Wednesday 17 September 2008 18:28, Marcel Moolenaar wrote:
> On Sep 11, 2008, at 1:23 AM, Marc Lörner wrote:
> > Hello!
> > I've got good news:
> > Finally GENERIC-kernel without SMP-support is running now on my
> > montecito
> > box :-)
>
> Is the 7-STABLE?
>

It's 7.0-RELEASE-p3

> I've been running 8-CURRENT on a Montecito for a while now.
>
> > When turning on SMP, I always get an Page-Not-Present in function vcnt
> > in vm/vm_meter.c when it iterates through found CPUs.
>
> There are optimization bugs, which pretty much forces us
> to run with INVARIANTS for now. I haven't had the time to
> dig into it.
>
> > Following is the output of the APIC-table:
> >
> > Table 'APIC' at 0xe0000000ff1b6620
> >        Local APIC address=0xfee00000
> >        Local SAPIC entry
> >                ProcessorId=0x0, Id=0x0, Eid=0x0
> >        Local SAPIC entry
> >                ProcessorId=0x1, Id=0x1, Eid=0x0 (disabled)
> >        Local SAPIC entry
> >                ProcessorId=0x2, Id=0x2, Eid=0x0
> >        Local SAPIC entry
> >                ProcessorId=0x3, Id=0x3, Eid=0x0 (disabled)
> >
> >
> > I think the case of running/enabled CPUs being not contiguous is not
> > thought
> > of when initializing pcpus.
>
> I don't think that's the problem. My box has disables CPUs
> as well and there are no panics there. In any case, if we
> want to support hot-pluggable CPUs, we cannot assume that
> if there are N CPUs, index [0..N> are in use...
>
> FYI,

I did following little patch in sys/ia64/acpica/madt.c in function 
ia64_probe_sapics:
- added local variable (initialized to zero) for counting cpus
- in local-sapic case: use local variable as first parameter in cpu_mp_add
  and increment it

After that I sometimes went into an Page-Not-Present fault (see discussion of 
asymmetric mtx_[un]lock_sleep on hackers mailinglist).

After some more debugging I recognized that curthread and access to pcpu in 
machine-dependent code (sys/ia64/include/pcpu.h) is not preemption-ready. So 
I made some little adaption from sys/amd64/include/pcpu.h.
=> Since today, I'm testing stability of SMP-kernel (7.0-RELEASE-p3) with 
these two bugfixes and without invariant and witness support.

Regards,
Marc Loerner


More information about the freebsd-ia64 mailing list