Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 1996 13:52:50 -0600
From:      Steve Passe <smp@csn.net>
To:        Lars_Koeller@odie.physik2.uni-rostock.de
Cc:        questions@freefall.freebsd.org
Subject:   getting started with FreeBSD SMP
Message-ID:  <199608121952.NAA13746@clem.systemsix.com>

next in thread | raw e-mail | index | archive | help
Hi,

>      Where can I  find some information (papers,READMES,source)  about the
>   FreeBSD SMP implementation and  the final design goals (threaded kernel,
>   Master CPU, ....).
>
>   Thanks
>
>   Lars

First, you need to subscribe to the SMP mailing list: smp@freebsd.org

Here are my notes from my experiences getting setup for SMP:

===============================================================================
--
[ install the latest 2.2-SNAP ]
[ you might also want to sup -current after that ]

--
# save the standard src/sys tree:
cd /usr/src
mv sys sys-UP

--
# get a CVS tree of the SMP src/sys:

cd /usr/sup

[ create an smp-supfile: ]
src-sys release=smp host=sup.FreeBSD.org hostbase=/home base=/usr 
prefix=/usr/local/src/FreeBSD/smp delete old use-rel-suffix

sup -v smp-supfile

--
# checkout a new (ie, SMP) src/sys tree:
cd /usr/src
cvs -d /usr/local/src/FreeBSD/smp checkout sys
mv sys sys-SMP
ln -s sys-SMP sys

--
cd /usr/src/sys
make all install

--
cd /usr/src/sys/i386/conf
cp GENERIC SMP

[ edit SMP, adding: ]
# Symmetrical Multi Processor
options		SMP
options		"NCPU=2"

config SMP
cd ../../compile/SMP
make depend; make; make install

--
cd /
mv kernel.old kernel-UP
halt

--
# reboot new kernel and start second CPU:

sysctl -w kern.smp_active=2

-------------------------------------------------------------------------------
there is a problem syncing disks when 'halt'ing with the 2nd CPU
active.  I do the following to get around this:

cd /sbin
mv halt realhalt

[ edit a script called /sbin/halt: ]
#!/bin/sh

sysctl -w kern.smp_active=0
exec /sbin/realhalt


===============================================================================

--
Steve Passe	| powered by
smp@csn.net	|            FreeBSD

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzHe7tEAAAEEAM274wAEEdP+grIrV6UtBt54FB5ufifFRA5ujzflrvlF8aoE
04it5BsUPFi3jJLfvOQeydbegexspPXL6kUejYt2OeptHuroIVW5+y2M2naTwqtX
WVGeBP6s2q/fPPAS+g+sNZCpVBTbuinKa/C4Q6HJ++M9AyzIq5EuvO0a8Rr9AAUR
tBlTdGV2ZSBQYXNzZSA8c21wQGNzbi5uZXQ+
=ds99
-----END PGP PUBLIC KEY BLOCK-----





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608121952.NAA13746>