From owner-freebsd-smp Thu Jul 4 18:58:10 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA00874 for smp-outgoing; Thu, 4 Jul 1996 18:58:10 -0700 (PDT) Received: from spinner.DIALix.COM (root@spinner.DIALix.COM [192.203.228.67]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA00866 for ; Thu, 4 Jul 1996 18:58:05 -0700 (PDT) Received: from spinner.DIALix.COM (peter@localhost.DIALix.oz.au [127.0.0.1]) by spinner.DIALix.COM (8.7.5/8.7.3) with ESMTP id JAA18293; Fri, 5 Jul 1996 09:57:41 +0800 (WST) Message-Id: <199607050157.JAA18293@spinner.DIALix.COM> X-Mailer: exmh version 1.6.6 3/24/96 To: erich@uruk.org cc: freebsd-smp@freebsd.org Subject: Re: Running SMP In-reply-to: Your message of "Thu, 04 Jul 1996 11:44:12 MST." <199607041844.LAA11426@uruk.org> Date: Fri, 05 Jul 1996 09:57:40 +0800 From: Peter Wemm Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >>>erich@uruk.org said: > > 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. Cheers, -Peter