From owner-freebsd-smp Fri Jan 11 19:49:10 2002 Delivered-To: freebsd-smp@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id 0B1DC37B41A; Fri, 11 Jan 2002 19:49:07 -0800 (PST) Received: from peter3.wemm.org ([12.232.27.13]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020112034904.XFBX3578.rwcrmhc52.attbi.com@peter3.wemm.org>; Sat, 12 Jan 2002 03:49:04 +0000 Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id g0C3n4s68760; Fri, 11 Jan 2002 19:49:04 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 7784A38FD; Fri, 11 Jan 2002 19:49:04 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Mark Murray Cc: Chris Faulhaber , scottl@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: P5 vs. SMP, part 2 In-Reply-To: <200201112015.g0BKFE103071@grimreaper.grondar.org> Date: Fri, 11 Jan 2002 19:49:04 -0800 From: Peter Wemm Message-Id: <20020112034904.7784A38FD@overcee.netplex.com.au> Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Mark Murray wrote: > > I wonder how many dual P5's are still being used :/ > > I have one (2xP5 @200MHz); I use it only in desktop mode, and it > launches X and Mozilla-CURRENT very slowly. I'm running CURRENT. The good news is that I found part of the problem. Fix: Index: machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v retrieving revision 1.385.2.21 diff -u -1 -2 -r1.385.2.21 machdep.c --- machdep.c 2001/12/13 19:18:00 1.385.2.21 +++ machdep.c 2002/01/12 03:35:12 @@ -1093,24 +1093,25 @@ void cpu_setregs(void) { unsigned int cr0; cr0 = rcr0(); cr0 |= CR0_NE; /* Done by npxinit() */ cr0 |= CR0_MP | CR0_TS; /* Done at every execve() too. */ #ifdef I386_CPU if (cpu_class != CPUCLASS_386) #endif cr0 |= CR0_WP | CR0_AM; + cr0 &= ~(CR0_CD | CR0_NW); load_cr0(cr0); load_gs(_udatasel); } static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) { int error; error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); if (!error && req->newptr) resettodr(); The problem is that the AP cpus were running with the CR0_CD (cache disable) and CR0_NW (cache writethrough, not writeback). This is very bad. :-] PPro and above bioses seem to cause the AP cpus enter the kernel with cache enabled, so that this looks like it should be a p5/i586 problem only. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message