From owner-freebsd-smp Fri Jul 5 12:09:37 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA27388 for smp-outgoing; Fri, 5 Jul 1996 12:09:37 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id MAA27377 for ; Fri, 5 Jul 1996 12:09:34 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id MAA15231; Fri, 5 Jul 1996 12:05:51 -0700 From: Terry Lambert Message-Id: <199607051905.MAA15231@phaeton.artisoft.com> Subject: Re: Running SMP To: peter@spinner.dialix.com (Peter Wemm) Date: Fri, 5 Jul 1996 12:05:50 -0700 (MST) Cc: erich@uruk.org, freebsd-smp@freebsd.org In-Reply-To: <199607050157.JAA18293@spinner.DIALix.COM> from "Peter Wemm" at Jul 5, 96 09:57:40 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > After hacking the hard-coded base address of the APIC, I tried running > > some kernel compiles to see what kind of performance I was getting. > > > > Frankly, it was pretty rotten. Here's what I got (multiprocessor > > 150MHz Pentium Pro w/256K caches): > > > > FreeBSD SMP 1 CPU : 4:36 > > -j 2 : 4:15 > > > > FreeBSD SMP 2 CPU : 4:28 > > -j 2 : 4:28 > > > > This was all compiling the SMP kernel with almost no devices. I almost > > couldn't tell the other CPU was activated, except that "sysctl" told > > me in big bold letters that it was, and I kept getting kernel error > > messages about "calcru: negative time: ..." and such after doing it. > > > > Linux-SMP would give me at least a 1.5x speedup with a full kernel spinlock > > and badly parallelized makefile. What's the deal here? > > Yes, the FreeBSD 'make -j' does nothing much. I (and so does phk) use the > NetBSD make, which truely does run parallel jobs. However, the NetBSD > make is no longer compatable with our Makefile tree since Jordan changed > the obj dir stuff... it can only be used on the kernel now.... > > If you use that, and set COPTS="-O -pipe" in /etc/make.conf, and use > somewhere around 'make -j3', you should see up to 180% or so of the speed > of the single-job make on a SMP kernel. > > However, the single-job SMP kernel runs things slower than non-smp > (probably because of the scheduling, which is partly worked around in the > code that I have on my checked out copy of the source). 'make -j3' was > between 130% and 150% of the speed of the uniprocessor, generic kernel > though, even with our bogus scheduling. Actually, I got my (better than UP) numbers by increasing the activation cycle for the kernel entrancy unlocking. Basically, I ran the parallel make in an xterm window, then ...uh, then set a textbook on the keypad enter key on the console keyboard. 8-) 8-) 8-). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.