CFD: XMLification of NOTES
jhb at FreeBSD.org
Thu Apr 1 10:12:17 PST 2004
On Thursday 01 April 2004 12:11 am, Bruce Evans wrote:
> On Wed, 31 Mar 2004, John Baldwin wrote:
> > On Tuesday 30 March 2004 06:54 pm, Dag-Erling Smørgrav wrote:
> > > CPU_I386 should not conflict with SMP, but a kernel build with both
> > > will be very slow.
> > No, it does conflict. There's no cmpxchg on i386 and no one has had the
> > desire or time to emulate one for 386 machines. Doing so would be a
> > waste in my opinion as well.
> des only claimed that it "should not".
> Emulating cmpxchg might make a kernel built with both slow, but the
> current CPU_I386 only adds a tiny amount of slowness. It just doesn't
> work on multi-CPU systems if multiple CPUs are actually used.
> Does it actually conflict in practice (except for the forced #error)
> if the hardware is UP? jhb's APIC changes made configuring with SMP
> not require APIC, so SMP kernels work on UP systems. Configuring with
> I386_CPU shouldn't affect this, but it does because of the forced #error
> at compile time.
Hmm. Well, if the hardware is UP the kernel still does 'cmpxchg'
instructions, so you'd still have to emulate cmpxchg for the kernel. There's
another problem in that I think Peter changed the pmap to make using invltlb
in place of invlpg be a compile time decision rather than a runtime decision.
If someone wants to write an in-kernel cmpxchg emulator then I wouldn't mind
having I386_CPU just turn on the extra runtime checks for invltlb vs. invlpg.
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-arch