From owner-freebsd-smp Sun Aug 9 05:34:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA14163 for freebsd-smp-outgoing; Sun, 9 Aug 1998 05:34:02 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from krygierpc.kph.uni-mainz.de (krygierpc.kph.uni-mainz.de [134.93.132.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA14127; Sun, 9 Aug 1998 05:33:59 -0700 (PDT) (envelope-from krygier@kph.uni-mainz.de) Received: from localhost (krygier@localhost) by krygierpc.kph.uni-mainz.de (8.8.8/8.8.8) with ESMTP id OAA02078; Sun, 9 Aug 1998 14:33:39 +0200 (CEST) (envelope-from krygier@kph.uni-mainz.de) X-Authentication-Warning: krygierpc.kph.uni-mainz.de: krygier owned process doing -bs Date: Sun, 9 Aug 1998 14:33:39 +0200 (CEST) From: Klaus Werner Krygier To: Sxren Schmidt cc: smp@FreeBSD.ORG Subject: Re: system lock-up In-Reply-To: <199808081902.VAA00319@sos.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, 8 Aug 1998, Sxren Schmidt wrote: > > Hmm, well when you run SMP there can be much more disk access going > on so it could still be significant... > If it was a SCSI problem, why did older SNAPS (especially 3.0-970807-SNAP which I used for almost 1 year) work fine on exactly the same hardware? > Are all 3 system P5 based ?? It could be that we have gotten some > P6 depended code in there... > Yes all 3 systems are P5 based. In the future I want to upgrade to Pentium II systems. How stable is SMP on such systems? Can someone give me hints what hardware to buy? Klaus Werner Krygier +-----------------------------------------------------------------------+ | Dr. Klaus Werner Krygier | Email: krygier@kph.uni-mainz.de | | Institut für Kernphysik | | | Johannes Gutenberg-Universität | Tel: +49-6131-39-2960 | | J.J.Becher-Weg 45 | +49-6131-39-5868 | | D-55099 Mainz | Fax: +49-6131-39-2964 | +-----------------------------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Aug 9 05:46:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA14780 for freebsd-smp-outgoing; Sun, 9 Aug 1998 05:46:44 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from krygierpc.kph.uni-mainz.de (krygierpc.kph.uni-mainz.de [134.93.132.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA14775 for ; Sun, 9 Aug 1998 05:46:41 -0700 (PDT) (envelope-from krygier@kph.uni-mainz.de) Received: from localhost (krygier@localhost) by krygierpc.kph.uni-mainz.de (8.8.8/8.8.8) with ESMTP id OAA02104; Sun, 9 Aug 1998 14:46:11 +0200 (CEST) (envelope-from krygier@kph.uni-mainz.de) X-Authentication-Warning: krygierpc.kph.uni-mainz.de: krygier owned process doing -bs Date: Sun, 9 Aug 1998 14:46:11 +0200 (CEST) From: Klaus Werner Krygier To: Andy Farkas cc: freebsd-smp@FreeBSD.ORG Subject: Re: system lock-up In-Reply-To: <35CD1237.75F2C08A@speednet.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 9 Aug 1998, Andy Farkas wrote: > Søren Schmidt wrote: > > > In reply to Klaus Werner Krygier ... > > > > Hmm, I run two SMP systems here: > > > > 2*200Mhz P6 on TYAN S1662D NCR875 SCSI 4Gnarrow 96M > > 2*233Mhz P6 on TYAN S1668D EIDE UDMA 2*4.3G 1*11.5G 256M > > > > Both systems are rock stable, no bad symptoms whatsoever. > > > > Which SNAP are you running? > At the moment I run 3.0-980524-SNAP. But I tried several others since then, especially 3.0-19980720-SNAP, 3.0-19980802-SNAP and a 3.0CAM-SNAP of july. They all didn't solve my problems (system freeze at high disk load) which I didn't have with 3.0-970807-SNAP. The problems occured already in a SNAP which I tried in October 97. Klaus Werner Krygier +-----------------------------------------------------------------------+ | Dr. Klaus Werner Krygier | Email: krygier@kph.uni-mainz.de | | Institut für Kernphysik | | | Johannes Gutenberg-Universität | Tel: +49-6131-39-2960 | | J.J.Becher-Weg 45 | +49-6131-39-5868 | | D-55099 Mainz | Fax: +49-6131-39-2964 | +-----------------------------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Aug 9 11:36:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA08754 for freebsd-smp-outgoing; Sun, 9 Aug 1998 11:36:07 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from slip-3.slip.net (slip-3.slip.net [207.171.193.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA08749 for ; Sun, 9 Aug 1998 11:36:06 -0700 (PDT) (envelope-from thomma@slip.net) Received: from thomma by slip-3.slip.net with local (Exim 1.90 #1) for freebsd-smp@freebsd.org id 0z5aJX-00016o-00; Sun, 9 Aug 1998 11:35:31 -0700 Subject: SMP buildworld benchmark To: freebsd-smp@FreeBSD.ORG Date: Sun, 9 Aug 1998 11:35:31 -0700 (PDT) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Tamiji Homma Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello, I recently built 440FX dual Pentium Pro system. I installed Aug 7 1998 -current and did benchmark test. The benchmark is 'make -jN buildworld' where N = 1, 2, 3, 4, 5, 6, 8, 10, 12. Intel Providence, dual 210MHz Pentium Pro 512KB L2, 128MB ECC, single 4.5G UW IBM 9ES/onboard aic7880. SMP kernel options are options SOFTUPDATES options AHC_TAGENABLE options AHC_SCBPAGING_ENABLE options AHC_ALLOW_MEMIO So far about 40 make buildworld have been done with this system. The machine locked up completely(needed reset botton) right after heavy disk activity once. This could be overclocking. Here is result. N /usr/bin/time make -jN buildworld ======================================================= 1 6495.59 real 3593.83 user 1453.02 sys 2 3862.54 real 3625.50 user 1638.14 sys 3 3588.17 real 3623.53 user 1707.50 sys 4 3470.95 real 3632.61 user 1723.28 sys 5 3458.07 real 3639.82 user 1729.67 sys 6 3457.54 real 3635.97 user 1750.31 sys 8 3448.70 real 3643.65 user 1749.66 sys <== fastest 10 3453.29 real 3649.54 user 1749.78 sys 12 3499.55 real 3652.27 user 1743.33 sys CPU N ratio Real time graph ============================================================================= 1 100.00 ***************************************************************** 2 168.17 *************************************** 3 181.03 ************************************ 4 187.14 *********************************** 5 187.84 *********************************** 6 187.87 *********************************** 8 188.35 *********************************** 10 188.10 *********************************** 12 185.61 *********************************** Tammy To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Mon Aug 10 10:28:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA06202 for freebsd-smp-outgoing; Mon, 10 Aug 1998 10:28:18 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from smtp.algonet.se (tomei.algonet.se [194.213.74.114]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id KAA06189 for ; Mon, 10 Aug 1998 10:28:16 -0700 (PDT) (envelope-from mal@algonet.se) Received: (qmail 132 invoked from network); 10 Aug 1998 19:27:52 +0200 Received: from kairos.algonet.se (HELO kairos) (194.213.74.18) by tomei.algonet.se with SMTP; 10 Aug 1998 19:27:52 +0200 Received: (mal@localhost) by kairos (SMI-8.6/8.6.12) id TAA20804; Mon, 10 Aug 1998 19:27:52 +0200 Date: Mon, 10 Aug 1998 19:27:52 +0200 Message-Id: <199808101727.TAA20804@kairos> From: Mats Lofkvist To: freebsd-smp@FreeBSD.ORG Subject: SMP + Wine => panic Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I got a kernel panic when trying to run wine on my SMP current system (cvsup'ped July 21, 2xPpro233 on Providence mb, smp+softupdates). Could it be the USER_LDT stuff not working with SMP? I have appended the stack trace, if someone wants more info just ask. _ Mats Lofkvist mal@algonet.se PS Is anyone working on replacing the clone() calls in wine with something that could work on FreeBSD? I could only find rather old messages about it via dejanews. PPS Which of the sysctl vars am I supposed to tweak to turn the second processor off? (Note: I had to type 'panic' twice at the debugger prompt to get the dump) bash# gdb -k GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.16 (i386-unknown-freebsd), Copyright 1996 Free Software Foundation, Inc. (kgdb) symbol-file kernel.debug Reading symbols from kernel.debug...done. (kgdb) exec-file /var/crash/kernel.0 (kgdb) core-file /var/crash/vmcore.0 IdlePTD 2605056 initial pcb at 223524 panicstr: from debugger panic messages: --- Fatal trap 12: page fault while in kernel mode mp_lock = 00000002; cpuid = 0; lapic.id = 00000000 fault virtual address = 0xf447a018 fault code = supervisor read, page not present instruction pointer = 0x8:0xf01e6884 stack pointer = 0x10:0xf4449f44 frame pointer = 0x10:0xf4449f64 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = resume, IOPL = 0 current process = 225 (xclock) interrupt mask = <- SMP: XXX panic: from debugger mp_lock = 00000002; cpuid = 0; lapic.id = 00000000 panic: from debugger mp_lock = 00000003; cpuid = 0; lapic.id = 00000000 boot() called on cpu#0 dumping to dev 30409, offset 278528 dump 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 --- #0 boot (howto=260) at ../../kern/kern_shutdown.c:286 286 dumppcb.pcb_cr3 = rcr3(); (kgdb) where #0 boot (howto=260) at ../../kern/kern_shutdown.c:286 #1 0xf0118312 in panic (fmt=0xf0101548 "from debugger") at ../../kern/kern_shutdown.c:427 #2 0xf0101565 in db_panic (addr=-266442620, have_addr=0, count=-1, modif=0xf4449dc0 "") at ../../ddb/db_command.c:432 #3 0xf0101445 in db_command (last_cmdp=0xf020faf4, cmd_table=0xf020f954, aux_cmd_tablep=0xf0220920) at ../../ddb/db_command.c:332 #4 0xf01015d2 in db_command_loop () at ../../ddb/db_command.c:454 #5 0xf0103ce3 in db_trap (type=12, code=0) at ../../ddb/db_trap.c:71 #6 0xf01d57f4 in kdb_trap (type=12, code=0, regs=0xf4449f08) at ../../i386/i386/db_interface.c:157 #7 0xf01e7a9d in trap_fatal (frame=0xf4449f08) at ../../i386/i386/trap.c:874 #8 0xf01e74cc in trap_pfault (frame=0xf4449f08, usermode=0) at ../../i386/i386/trap.c:772 #9 0xf01e711f in trap (frame={tf_es = -197263344, tf_ds = 16, tf_edi = -1, tf_esi = -197253696, tf_ebp = -196829340, tf_isp = -196829392, tf_ebx = 0, tf_edx = -196837376, tf_ecx = -197253696, tf_eax = 24, tf_trapno = 12, tf_err = 0, tf_eip = -266442620, tf_cs = 8, tf_eflags = 65606, tf_esp = -267277899, tf_ss = -197253696}) at ../../i386/i386/trap.c:396 #10 0xf01e6884 in cpu_switch_load_fs () #11 0xf01e7e95 in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = 128, tf_esi = 215040, tf_ebp = -272641992, tf_isp = -196829212, tf_ebx = 538054752, tf_edx = 538060952, tf_ecx = 212992, tf_eax = 128, tf_trapno = 22, tf_err = 7, tf_eip = 538601793, tf_cs = 31, tf_eflags = 534, tf_esp = -272642012, tf_ss = 39}) at ../../i386/i386/trap.c:190 #12 0x201a6941 in ?? () #13 0x200cf321 in ?? () #14 0x200b5a43 in ?? () #15 0x200b5b16 in ?? () #16 0x200a5af8 in ?? () #17 0x2006daba in ?? () #18 0x200652f7 in ?? () #19 0x1993 in ?? () #20 0x1099 in ?? () (kgdb) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Mon Aug 10 14:42:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA05375 for freebsd-smp-outgoing; Mon, 10 Aug 1998 14:42:05 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA05340 for ; Mon, 10 Aug 1998 14:42:01 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id RAA23228; Mon, 10 Aug 1998 17:26:52 -0400 (EDT) (envelope-from luoqi) Date: Mon, 10 Aug 1998 17:26:52 -0400 (EDT) From: Luoqi Chen Message-Id: <199808102126.RAA23228@lor.watermarkgroup.com> To: freebsd-smp@FreeBSD.ORG, mal@algonet.se Subject: Re: SMP + Wine => panic Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I got a kernel panic when trying to run wine on my SMP current system > (cvsup'ped July 21, 2xPpro233 on Providence mb, smp+softupdates). > > Could it be the USER_LDT stuff not working with SMP? > > I have appended the stack trace, if someone wants more info just ask. > I doubt it's SMP related. It looked like the page fault occured when trying to access the user ldt table. Could you look at pcb->pcb_ldt (long word at 0xf444801c)? Is it 0? You may want to try the patch I submitted in PR i386/6219 (use the patch in my own follow up, there're some error in the original submission). > _ > Mats Lofkvist > mal@algonet.se > > PS Is anyone working on replacing the clone() calls in wine with > something that could work on FreeBSD? I could only find rather > old messages about it via dejanews. I implemented the function SYSDEPS_SpawnThread() [scheduler/sysdeps.c] with rfork(), but have never tried it (don't have a multithread application that runs under wine). You may download it from http://www.winehq.com/patches980712/fbsd-thread > > PPS Which of the sysctl vars am I supposed to tweak to turn > the second processor off? > machdep.smp_active -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Aug 11 14:24:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA07865 for freebsd-smp-outgoing; Tue, 11 Aug 1998 14:24:16 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from smtp.algonet.se (angel.algonet.se [194.213.74.112]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id OAA07852 for ; Tue, 11 Aug 1998 14:24:06 -0700 (PDT) (envelope-from mal@algonet.se) Received: (qmail 28543 invoked from network); 11 Aug 1998 21:23:27 -0000 Received: from kairos.algonet.se (HELO kairos) (194.213.74.18) by angel.algonet.se with SMTP; 11 Aug 1998 21:23:27 -0000 Received: (mal@localhost) by kairos (SMI-8.6/8.6.12) id XAA09082; Tue, 11 Aug 1998 23:23:27 +0200 Date: Tue, 11 Aug 1998 23:23:27 +0200 Message-Id: <199808112123.XAA09082@kairos> From: Mats Lofkvist To: luoqi@watermarkgroup.com CC: freebsd-smp@FreeBSD.ORG In-reply-to: <199808102126.RAA23228@lor.watermarkgroup.com> (message from Luoqi Chen on Mon, 10 Aug 1998 17:26:52 -0400 (EDT)) Subject: Re: SMP + Wine => panic References: <199808102126.RAA23228@lor.watermarkgroup.com> Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Date: Mon, 10 Aug 1998 17:26:52 -0400 (EDT) From: Luoqi Chen > I got a kernel panic when trying to run wine on my SMP current system > (cvsup'ped July 21, 2xPpro233 on Providence mb, smp+softupdates). > > Could it be the USER_LDT stuff not working with SMP? > > I have appended the stack trace, if someone wants more info just ask. > I doubt it's SMP related. It looked like the page fault occured when trying to access the user ldt table. Could you look at pcb->pcb_ldt (long word at 0xf444801c)? Is it 0? You may want to try the patch I submitted in PR i386/6219 (use the patch in my own follow up, there're some error in the original submission). (kgdb) print/x *0xf444801c $1 = 0x0 If I turn off the second processor with machdep.smp_active=0, I do _not_ get any panics. I also tried the pr 6219 fix, doesn't seem to make any difference. When trying it a few times I noted that the current process is not wine, but some other process like bash or xclock. Is wine doing something (e.g. via user ldt) to one of the processors which is not kept track of when wine wanders to the other cpu? (I also had problems getting a dump after applying the pr 6219 fix, the system hangs when trying to sync the disks. Is there a command that goes more directly to the dumping than 'panic'?) _ Mats Lofkvist mal@algonet.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Aug 11 15:45:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA20083 for freebsd-smp-outgoing; Tue, 11 Aug 1998 15:45:47 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA20073 for ; Tue, 11 Aug 1998 15:45:38 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id SAA01400; Tue, 11 Aug 1998 18:45:07 -0400 (EDT) (envelope-from luoqi) Date: Tue, 11 Aug 1998 18:45:07 -0400 (EDT) From: Luoqi Chen Message-Id: <199808112245.SAA01400@lor.watermarkgroup.com> To: luoqi@watermarkgroup.com, mal@algonet.se Subject: Re: SMP + Wine => panic Cc: freebsd-smp@FreeBSD.ORG Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > (kgdb) print/x *0xf444801c > $1 = 0x0 > > If I turn off the second processor with machdep.smp_active=0, > I do _not_ get any panics. > > I also tried the pr 6219 fix, doesn't seem to make any difference. > When trying it a few times I noted that the current process is > not wine, but some other process like bash or xclock. Is wine > doing something (e.g. via user ldt) to one of the processors > which is not kept track of when wine wanders to the other cpu? > > (I also had problems getting a dump after applying the pr 6219 fix, > the system hangs when trying to sync the disks. Is there a command > that goes more directly to the dumping than 'panic'?) > > _ > Mats Lofkvist > mal@algonet.se > I was wrong about it's unrelated to SMP. It is. We have to move global variable currentldt into per-cpu area. Try the patches below, they include the PR i386/6219 fix. -lq Index: sys/i386/i386/genassym.c =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/genassym.c,v retrieving revision 1.59 diff -u -r1.59 genassym.c --- genassym.c 1998/07/11 12:17:07 1.59 +++ genassym.c 1998/08/11 22:26:13 @@ -38,6 +38,7 @@ */ #include "opt_vm86.h" +#include "opt_user_ldt.h" #include @@ -203,6 +204,9 @@ printf("#define\tGD_COMMON_TSSD %#x\n", OS(globaldata, common_tssd)); printf("#define\tGD_PRIVATE_TSS %#x\n", OS(globaldata, private_tss)); printf("#define\tGD_MY_TR %#x\n", OS(globaldata, my_tr)); +#endif +#ifdef USER_LDT + printf("#define\tGD_CURRENTLDT %#x\n", OS(globaldata, currentldt)); #endif #ifdef SMP printf("#define\tGD_CPUID %#x\n", OS(globaldata, cpuid)); Index: sys/i386/i386/globals.s =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/globals.s,v retrieving revision 1.6 diff -u -r1.6 globals.s --- globals.s 1998/06/21 14:45:00 1.6 +++ globals.s 1998/08/11 22:26:42 @@ -27,6 +27,7 @@ */ #include "opt_vm86.h" +#include "opt_user_ldt.h" #ifndef SMP #include @@ -82,6 +83,11 @@ .set _common_tssd,globaldata + GD_COMMON_TSSD .set _private_tss,globaldata + GD_PRIVATE_TSS .set _my_tr,globaldata + GD_MY_TR +#endif + +#ifdef USER_LDT + .globl _currentldt + .set _currentldt,globaldata + GD_CURRENTLDT #endif #ifdef SMP Index: sys/i386/i386/machdep.c =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/machdep.c,v retrieving revision 1.303 diff -u -r1.303 machdep.c --- machdep.c 1998/07/11 07:45:30 1.303 +++ machdep.c 1998/08/11 22:35:23 @@ -801,14 +801,15 @@ u_long stack; { struct trapframe *regs = p->p_md.md_regs; - -#ifdef USER_LDT struct pcb *pcb = &p->p_addr->u_pcb; +#ifdef USER_LDT /* was i386_user_cleanup() in NetBSD */ if (pcb->pcb_ldt) { - if (pcb == curpcb) - lldt(GSEL(GUSERLDT_SEL, SEL_KPL)); + if (pcb == curpcb) { + lldt(_default_ldt); + currentldt = _default_ldt; + } kmem_free(kernel_map, (vm_offset_t)pcb->pcb_ldt, pcb->pcb_ldt_len * sizeof(union descriptor)); pcb->pcb_ldt_len = (int)pcb->pcb_ldt = 0; @@ -824,6 +825,14 @@ regs->tf_es = _udatasel; regs->tf_cs = _ucodesel; + /* reset %fs and %gs as well */ + pcb->pcb_fs = _udatasel; + pcb->pcb_gs = _udatasel; + if (pcb == curpcb) { + __asm("mov %0,%%fs" : : "r" (_udatasel)); + __asm("mov %0,%%gs" : : "r" (_udatasel)); + } + /* * Initialize the math emulator (if any) for the current process. * Actually, just clear the bit that says that the emulator has @@ -881,7 +890,6 @@ * Initialize segments & interrupt table */ -int currentldt; int _default_ldt; #ifdef SMP union descriptor gdt[NGDT + NCPU]; /* global descriptor table */ @@ -1248,7 +1256,9 @@ _default_ldt = GSEL(GLDT_SEL, SEL_KPL); lldt(_default_ldt); +#ifdef USER_LDT currentldt = _default_ldt; +#endif #ifdef DDB kdb_init(); Index: sys/i386/i386/mp_machdep.c =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/mp_machdep.c,v retrieving revision 1.76 diff -u -r1.76 mp_machdep.c --- mp_machdep.c 1998/05/17 22:12:08 1.76 +++ mp_machdep.c 1998/08/11 22:25:26 @@ -28,6 +28,7 @@ #include "opt_smp.h" #include "opt_vm86.h" #include "opt_cpu.h" +#include "opt_user_ldt.h" #ifdef SMP #include @@ -466,6 +467,9 @@ lgdt(&r_gdt); /* does magic intra-segment return */ lidt(&r_idt); lldt(_default_ldt); +#ifdef USER_LDT + currentldt = _default_ldt; +#endif my_tr = NGDT + cpuid; gsel_tss = GSEL(my_tr, SEL_KPL); Index: sys/i386/i386/sys_machdep.c =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/sys_machdep.c,v retrieving revision 1.35 diff -u -r1.35 sys_machdep.c --- sys_machdep.c 1998/07/28 03:29:32 1.35 +++ sys_machdep.c 1998/08/11 22:32:03 @@ -64,8 +64,8 @@ -void set_user_ldt __P((struct pcb *pcb)); #ifdef USER_LDT +void set_user_ldt __P((struct pcb *pcb)); static int i386_get_ldt __P((struct proc *, char *)); static int i386_set_ldt __P((struct proc *, char *)); #endif Index: sys/i386/i386/vm_machdep.c =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/vm_machdep.c,v retrieving revision 1.108 diff -u -r1.108 vm_machdep.c --- vm_machdep.c 1998/05/19 00:00:10 1.108 +++ vm_machdep.c 1998/07/04 03:05:13 @@ -710,8 +710,10 @@ #endif #ifdef USER_LDT if (pcb->pcb_ldt != 0) { - if (pcb == curpcb) - lldt(GSEL(GUSERLDT_SEL, SEL_KPL)); + if (pcb == curpcb) { + lldt(_default_ldt); + currentldt = _default_ldt; + } kmem_free(kernel_map, (vm_offset_t)pcb->pcb_ldt, pcb->pcb_ldt_len * sizeof(union descriptor)); pcb->pcb_ldt_len = (int)pcb->pcb_ldt = 0; Index: sys/i386/include/globaldata.h =================================================================== RCS file: /fun/cvs/src/sys/i386/include/globaldata.h,v retrieving revision 1.5 diff -u -r1.5 globaldata.h --- globaldata.h 1998/05/28 09:30:02 1.5 +++ globaldata.h 1998/08/11 22:15:54 @@ -49,6 +49,9 @@ u_int private_tss; u_int my_tr; #endif +#ifdef USER_LDT + int currentldt; +#endif #ifdef SMP u_int cpuid; u_int cpu_lockid; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Aug 11 20:09:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA06094 for freebsd-smp-outgoing; Tue, 11 Aug 1998 20:09:32 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from gatekeeper.falcon.com (fppp6.sysnet.net [206.142.16.103]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA06076 for ; Tue, 11 Aug 1998 20:09:28 -0700 (PDT) (envelope-from patton@sysnet.net) Received: from [192.168.1.10] (saturn.falcon.com [192.168.1.10]) by gatekeeper.falcon.com (8.8.8/8.8.5) with ESMTP id WAA06337 for ; Tue, 11 Aug 1998 22:57:40 -0400 (EDT) X-Sender: patton@mail.sysnet.net Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 10 Aug 1998 22:47:37 -0400 To: freebsd-smp@FreeBSD.ORG From: Matthew Patton Subject: hanging second processor Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I'm running -current as of 2 days ago. The box is a Dual PPRO 240 (180's overclocked). I don't know where to lay the blame on this one yet but here goes. There is no user load but I'm running Distributed.net's rc5des crackers on the machine. It may take 5 minutes or 3 days but I eventually "loose" the second CPU. The rc5des process that was apparently running on it hangs, and I can't kill it no matter what I do. A shutdown (clean) and a hardware reset is needed to unwedge the processor. The main processor runs just peachy 100% of the time. Is the problem buggy rc5des code? Or some sort of race condition or bug in the FreeBSD scheduler? Apparently the program doesn't fork or thread itself to take advantage of 2 processors otherwise I would have specified numcpu=2. If I run 1 instance, it gives me 690kkeys/sec (the expected rate for a single processor). If I run 2 instances I get 690kkyes/sec/processor which leads me to believe each CPU is getting an instance. Anyone have an idea as to the problem? Are there some SMP aware programs that I can run for days that will hammer the CPU's? -------- "You need only reflect that one of the best ways to get yourself a reputation as a dangerous citizen these days is to go around repeating the very phrases which our founding fathers used in their struggle for independence," - Charles A. Beard (American historian) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Aug 12 01:40:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA20973 for freebsd-smp-outgoing; Wed, 12 Aug 1998 01:40:14 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from mail.ftf.dk (mail.ftf.dk [129.142.64.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA20952 for ; Wed, 12 Aug 1998 01:40:10 -0700 (PDT) (envelope-from regnauld@deepo.prosa.dk) Received: from mail.prosa.dk ([192.168.100.254]) by mail.ftf.dk (8.8.8/8.8.8/gw-ftf-1.0) with ESMTP id KAA29805; Wed, 12 Aug 1998 10:44:57 +0200 (CEST) (envelope-from regnauld@deepo.prosa.dk) Received: from deepo.prosa.dk (deepo.prosa.dk [192.168.100.10]) by mail.prosa.dk (8.8.8/8.8.5/prosa-1.1) with ESMTP id KAA16253; Wed, 12 Aug 1998 10:46:50 +0200 (CEST) Received: (from regnauld@localhost) by deepo.prosa.dk (8.8.8/8.8.5/prosa-1.1) id KAA17332; Wed, 12 Aug 1998 10:44:45 +0200 (CEST) Message-ID: <19980812104445.01764@deepo.prosa.dk> Date: Wed, 12 Aug 1998 10:44:45 +0200 From: Philippe Regnauld To: Tamiji Homma Cc: freebsd-smp@FreeBSD.ORG Subject: Re: SMP buildworld benchmark References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88e In-Reply-To: ; from Tamiji Homma on Sun, Aug 09, 1998 at 11:35:31AM -0700 X-Operating-System: FreeBSD 2.2.6-RELEASE i386 Phone: +45 3336 4148 Address: Ahlefeldtsgade 16, 1359 Copenhagen K, Denmark Organization: PROSA Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Tamiji Homma writes: > Intel Providence, dual 210MHz Pentium Pro 512KB L2, 128MB ECC, > single 4.5G UW IBM 9ES/onboard aic7880. SMP kernel options are > options SOFTUPDATES > options AHC_TAGENABLE > options AHC_SCBPAGING_ENABLE > options AHC_ALLOW_MEMIO > > The machine locked up completely(needed reset botton) right after > heavy disk activity once. This could be overclocking. CAM or no CAM ? Try to remove AHC_TAGENABLE -- I'm seeing the same problem. -- -[ Philippe Regnauld / sysadmin / regnauld@deepo.prosa.dk / +55.4N +11.3E ]- The Internet is busy. Please try again later. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Aug 12 02:53:51 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA02690 for freebsd-smp-outgoing; Wed, 12 Aug 1998 02:53:51 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from gatekeeper.falcon.com (appp2.sysnet.net [206.142.16.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA02681 for ; Wed, 12 Aug 1998 02:53:46 -0700 (PDT) (envelope-from patton@sysnet.net) Received: from [192.168.1.10] (saturn.falcon.com [192.168.1.10]) by gatekeeper.falcon.com (8.8.8/8.8.5) with ESMTP id FAA16060 for ; Wed, 12 Aug 1998 05:42:08 -0400 (EDT) X-Sender: patton@mail.sysnet.net Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 11 Aug 1998 05:58:27 -0400 To: freebsd-smp@FreeBSD.ORG From: Matthew Patton Subject: top and CPU's Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Is it a correct statement to say that the "STATE" and "C" accurately describe what processor a runnning process is using? I didn't see any reference to this in the man pages. -------- "You need only reflect that one of the best ways to get yourself a reputation as a dangerous citizen these days is to go around repeating the very phrases which our founding fathers used in their struggle for independence," - Charles A. Beard (American historian) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Aug 12 05:14:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA20488 for freebsd-smp-outgoing; Wed, 12 Aug 1998 05:14:06 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from bsd.synx.com (rt.synx.com [194.167.81.239]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id FAA20479 for ; Wed, 12 Aug 1998 05:14:02 -0700 (PDT) (envelope-from root@synx.com) Received: from synx.com (rn [192.1.1.241]) by bsd.synx.com (8.6.12/8.6.12) with ESMTP id NAA01791; Wed, 12 Aug 1998 13:13:16 +0100 Message-Id: <199808121213.NAA01791@bsd.synx.com> Date: Wed, 12 Aug 1998 14:13:12 +0200 (CEST) From: Remy NONNENMACHER Reply-To: remy@synx.com Subject: Re: hanging second processor To: patton@sysnet.net cc: freebsd-smp@FreeBSD.ORG In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 10 Aug, Matthew Patton wrote: > I'm running -current as of 2 days ago. The box is a Dual PPRO 240 (180's > overclocked). I don't know where to lay the blame on this one yet but here > goes. > > There is no user load but I'm running Distributed.net's rc5des crackers on > the machine. It may take 5 minutes or 3 days but I eventually "loose" the > second CPU. The rc5des process that was apparently running on it hangs, and > I can't kill it no matter what I do. A shutdown (clean) and a hardware > reset is needed to unwedge the processor. The main processor runs just > peachy 100% of the time. > > Is the problem buggy rc5des code? Or some sort of race condition or bug in > the FreeBSD scheduler? Apparently the program doesn't fork or thread itself > to take advantage of 2 processors otherwise I would have specified > numcpu=2. If I run 1 instance, it gives me 690kkeys/sec (the expected rate > for a single processor). If I run 2 instances I get 690kkyes/sec/processor > which leads me to believe each CPU is getting an instance. Anyone have an > idea as to the problem? Are there some SMP aware programs that I can run > for days that will hammer the CPU's? > I think that : main() {int i; while (1) i++;} will be just sufficient to lock your processor ;). (just start two of them). rc5des is a well known processor burner (just like a windows machine !!). Unix way of life keep processors cool (due to idle time) so you can overclock quiet safely. As soon as you try to fry eggs with your processors (running an endless, processor consuming, program), an overclocked processor may goes to high in temp. to properly function. I think that your second processor have a smaller temp operational limit than your first one !! For myself, i stopped helping rc5des on critical machines for temperature problems. RN. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Aug 12 05:38:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA22903 for freebsd-smp-outgoing; Wed, 12 Aug 1998 05:38:13 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from sos.freebsd.dk (sos.freebsd.dk [212.242.40.180]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA22896 for ; Wed, 12 Aug 1998 05:38:09 -0700 (PDT) (envelope-from sos@sos.freebsd.dk) Received: (from sos@localhost) by sos.freebsd.dk (8.9.1/8.8.8) id OAA00333; Wed, 12 Aug 1998 14:35:08 +0200 (CEST) (envelope-from sos) Message-Id: <199808121235.OAA00333@sos.freebsd.dk> Subject: Re: hanging second processor In-Reply-To: <199808121213.NAA01791@bsd.synx.com> from Remy NONNENMACHER at "Aug 12, 98 02:13:12 pm" To: remy@synx.com Date: Wed, 12 Aug 1998 14:35:08 +0200 (CEST) Cc: patton@sysnet.net, freebsd-smp@FreeBSD.ORG From: Søren Schmidt Reply-to: sos@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > On 10 Aug, Matthew Patton wrote: > I'm running -current as of 2 days ago. The box is a Dual PPRO 240 (180's > overclocked). I don't know where to lay the blame on this one yet but here > goes. Too agressive overclocking.. Try running the machine at 180Mhz and I'll bet it works (unless you have reabad cooling). -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Søren Schmidt (sos@FreeBSD.org) FreeBSD Core Team Even more code to hack -- will it ever end? .. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Aug 12 07:42:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA04298 for freebsd-smp-outgoing; Wed, 12 Aug 1998 07:42:26 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from smtp.algonet.se (angel.algonet.se [194.213.74.112]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id HAA04292 for ; Wed, 12 Aug 1998 07:42:22 -0700 (PDT) (envelope-from mal@algonet.se) Received: (qmail 11682 invoked from network); 12 Aug 1998 14:41:50 -0000 Received: from kairos.algonet.se (HELO kairos) (194.213.74.18) by angel.algonet.se with SMTP; 12 Aug 1998 14:41:50 -0000 Received: (mal@localhost) by kairos (SMI-8.6/8.6.12) id QAA21286; Wed, 12 Aug 1998 16:41:50 +0200 Date: Wed, 12 Aug 1998 16:41:50 +0200 Message-Id: <199808121441.QAA21286@kairos> From: Mats Lofkvist To: luoqi@watermarkgroup.com CC: freebsd-smp@FreeBSD.ORG In-reply-to: <199808112245.SAA01400@lor.watermarkgroup.com> (message from Luoqi Chen on Tue, 11 Aug 1998 18:45:07 -0400 (EDT)) Subject: Re: SMP + Wine => panic References: <199808112245.SAA01400@lor.watermarkgroup.com> Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The last patches did cure the problem. It looks like the program I wanted to run is a no-go, but that is a problem with wine, not freebsd. Thanks for the help! Tell me if you need help with more testing to get the code committed to the main tree. _ Mats Lofkvist mal@algonet.se Date: Tue, 11 Aug 1998 18:45:07 -0400 (EDT) From: Luoqi Chen Cc: freebsd-smp@FreeBSD.ORG Sender: owner-freebsd-smp@FreeBSD.ORG X-Loop: FreeBSD.org > (kgdb) print/x *0xf444801c > $1 = 0x0 > > If I turn off the second processor with machdep.smp_active=0, > I do _not_ get any panics. > > I also tried the pr 6219 fix, doesn't seem to make any difference. > When trying it a few times I noted that the current process is > not wine, but some other process like bash or xclock. Is wine > doing something (e.g. via user ldt) to one of the processors > which is not kept track of when wine wanders to the other cpu? > > (I also had problems getting a dump after applying the pr 6219 fix, > the system hangs when trying to sync the disks. Is there a command > that goes more directly to the dumping than 'panic'?) > > _ > Mats Lofkvist > mal@algonet.se > I was wrong about it's unrelated to SMP. It is. We have to move global variable currentldt into per-cpu area. Try the patches below, they include the PR i386/6219 fix. -lq Index: sys/i386/i386/genassym.c =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/genassym.c,v retrieving revision 1.59 diff -u -r1.59 genassym.c --- genassym.c 1998/07/11 12:17:07 1.59 +++ genassym.c 1998/08/11 22:26:13 @@ -38,6 +38,7 @@ */ #include "opt_vm86.h" +#include "opt_user_ldt.h" #include @@ -203,6 +204,9 @@ printf("#define\tGD_COMMON_TSSD %#x\n", OS(globaldata, common_tssd)); printf("#define\tGD_PRIVATE_TSS %#x\n", OS(globaldata, private_tss)); printf("#define\tGD_MY_TR %#x\n", OS(globaldata, my_tr)); +#endif +#ifdef USER_LDT + printf("#define\tGD_CURRENTLDT %#x\n", OS(globaldata, currentldt)); #endif #ifdef SMP printf("#define\tGD_CPUID %#x\n", OS(globaldata, cpuid)); Index: sys/i386/i386/globals.s =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/globals.s,v retrieving revision 1.6 diff -u -r1.6 globals.s --- globals.s 1998/06/21 14:45:00 1.6 +++ globals.s 1998/08/11 22:26:42 @@ -27,6 +27,7 @@ */ #include "opt_vm86.h" +#include "opt_user_ldt.h" #ifndef SMP #include @@ -82,6 +83,11 @@ .set _common_tssd,globaldata + GD_COMMON_TSSD .set _private_tss,globaldata + GD_PRIVATE_TSS .set _my_tr,globaldata + GD_MY_TR +#endif + +#ifdef USER_LDT + .globl _currentldt + .set _currentldt,globaldata + GD_CURRENTLDT #endif #ifdef SMP Index: sys/i386/i386/machdep.c =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/machdep.c,v retrieving revision 1.303 diff -u -r1.303 machdep.c --- machdep.c 1998/07/11 07:45:30 1.303 +++ machdep.c 1998/08/11 22:35:23 @@ -801,14 +801,15 @@ u_long stack; { struct trapframe *regs = p->p_md.md_regs; - -#ifdef USER_LDT struct pcb *pcb = &p->p_addr->u_pcb; +#ifdef USER_LDT /* was i386_user_cleanup() in NetBSD */ if (pcb->pcb_ldt) { - if (pcb == curpcb) - lldt(GSEL(GUSERLDT_SEL, SEL_KPL)); + if (pcb == curpcb) { + lldt(_default_ldt); + currentldt = _default_ldt; + } kmem_free(kernel_map, (vm_offset_t)pcb->pcb_ldt, pcb->pcb_ldt_len * sizeof(union descriptor)); pcb->pcb_ldt_len = (int)pcb->pcb_ldt = 0; @@ -824,6 +825,14 @@ regs->tf_es = _udatasel; regs->tf_cs = _ucodesel; + /* reset %fs and %gs as well */ + pcb->pcb_fs = _udatasel; + pcb->pcb_gs = _udatasel; + if (pcb == curpcb) { + __asm("mov %0,%%fs" : : "r" (_udatasel)); + __asm("mov %0,%%gs" : : "r" (_udatasel)); + } + /* * Initialize the math emulator (if any) for the current process. * Actually, just clear the bit that says that the emulator has @@ -881,7 +890,6 @@ * Initialize segments & interrupt table */ -int currentldt; int _default_ldt; #ifdef SMP union descriptor gdt[NGDT + NCPU]; /* global descriptor table */ @@ -1248,7 +1256,9 @@ _default_ldt = GSEL(GLDT_SEL, SEL_KPL); lldt(_default_ldt); +#ifdef USER_LDT currentldt = _default_ldt; +#endif #ifdef DDB kdb_init(); Index: sys/i386/i386/mp_machdep.c =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/mp_machdep.c,v retrieving revision 1.76 diff -u -r1.76 mp_machdep.c --- mp_machdep.c 1998/05/17 22:12:08 1.76 +++ mp_machdep.c 1998/08/11 22:25:26 @@ -28,6 +28,7 @@ #include "opt_smp.h" #include "opt_vm86.h" #include "opt_cpu.h" +#include "opt_user_ldt.h" #ifdef SMP #include @@ -466,6 +467,9 @@ lgdt(&r_gdt); /* does magic intra-segment return */ lidt(&r_idt); lldt(_default_ldt); +#ifdef USER_LDT + currentldt = _default_ldt; +#endif my_tr = NGDT + cpuid; gsel_tss = GSEL(my_tr, SEL_KPL); Index: sys/i386/i386/sys_machdep.c =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/sys_machdep.c,v retrieving revision 1.35 diff -u -r1.35 sys_machdep.c --- sys_machdep.c 1998/07/28 03:29:32 1.35 +++ sys_machdep.c 1998/08/11 22:32:03 @@ -64,8 +64,8 @@ -void set_user_ldt __P((struct pcb *pcb)); #ifdef USER_LDT +void set_user_ldt __P((struct pcb *pcb)); static int i386_get_ldt __P((struct proc *, char *)); static int i386_set_ldt __P((struct proc *, char *)); #endif Index: sys/i386/i386/vm_machdep.c =================================================================== RCS file: /fun/cvs/src/sys/i386/i386/vm_machdep.c,v retrieving revision 1.108 diff -u -r1.108 vm_machdep.c --- vm_machdep.c 1998/05/19 00:00:10 1.108 +++ vm_machdep.c 1998/07/04 03:05:13 @@ -710,8 +710,10 @@ #endif #ifdef USER_LDT if (pcb->pcb_ldt != 0) { - if (pcb == curpcb) - lldt(GSEL(GUSERLDT_SEL, SEL_KPL)); + if (pcb == curpcb) { + lldt(_default_ldt); + currentldt = _default_ldt; + } kmem_free(kernel_map, (vm_offset_t)pcb->pcb_ldt, pcb->pcb_ldt_len * sizeof(union descriptor)); pcb->pcb_ldt_len = (int)pcb->pcb_ldt = 0; Index: sys/i386/include/globaldata.h =================================================================== RCS file: /fun/cvs/src/sys/i386/include/globaldata.h,v retrieving revision 1.5 diff -u -r1.5 globaldata.h --- globaldata.h 1998/05/28 09:30:02 1.5 +++ globaldata.h 1998/08/11 22:15:54 @@ -49,6 +49,9 @@ u_int private_tss; u_int my_tr; #endif +#ifdef USER_LDT + int currentldt; +#endif #ifdef SMP u_int cpuid; u_int cpu_lockid; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Aug 12 08:02:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA07752 for freebsd-smp-outgoing; Wed, 12 Aug 1998 08:02:03 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from smtp-gw.BayNetworks.COM (ns1.BayNetworks.COM [134.177.3.20]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA07718 for ; Wed, 12 Aug 1998 08:01:57 -0700 (PDT) (envelope-from thomma@BayNetworks.COM) Received: from mailhost.BayNetworks.COM (h016b.s86b1.BayNetworks.COM [134.177.1.107] (may be forged)) by smtp-gw.BayNetworks.COM (8.8.8/8.8.8) with ESMTP id IAA13524; Wed, 12 Aug 1998 08:01:33 -0700 (PDT) Received: from fedex.engwest.baynetworks.com (fedex.engwest.baynetworks.com [134.177.110.46]) by mailhost.BayNetworks.COM (8.8.8/8.8.8) with SMTP id IAA27762; Wed, 12 Aug 1998 08:01:32 -0700 (PDT) Received: from carrera.engwest (carrera.engwest.baynetworks.com) by fedex.engwest.baynetworks.com (4.1/SMI-4.1) Received: from localhost by carrera.engwest (SMI-8.6/SMI-SVR4) id HAA10702; Wed, 12 Aug 1998 07:58:54 -0700 To: regnauld@deepo.prosa.dk Cc: thomma@slip.net, freebsd-smp@FreeBSD.ORG Subject: Re: SMP buildworld benchmark In-Reply-To: Your message of "Wed, 12 Aug 1998 10:44:45 +0200" <19980812104445.01764@deepo.prosa.dk> References: <19980812104445.01764@deepo.prosa.dk> X-Mailer: Mew version 1.92 on Emacs 19.28 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19980812075854Z.thomma@baynetworks.com> Date: Wed, 12 Aug 1998 07:58:54 -0700 From: Tamiji Homma X-Dispatcher: imput version 971024 Lines: 27 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Tamiji Homma writes: > Intel Providence, dual 210MHz Pentium Pro 512KB L2, 128MB ECC, > single 4.5G UW IBM 9ES/onboard aic7880. SMP kernel options are > options SOFTUPDATES > options AHC_TAGENABLE > options AHC_SCBPAGING_ENABLE > options AHC_ALLOW_MEMIO > > The machine locked up completely(needed reset botton) right after > heavy disk activity once. This could be overclocking. Philippe Regnauld wrote: > CAM or no CAM ? > > Try to remove AHC_TAGENABLE -- I'm seeing the same problem. The lockup happened without CAM. I have tried CAM but I haven't run many make buildworld with it yet. I'll kick off buildworld loop script tonight with CAM. It would take a few days to see if the problem goes away or not, though. If it does not go well, I'll turn off AHC_TAGENABLE and run the script again. Tammy To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Aug 12 11:04:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA09463 for freebsd-smp-outgoing; Wed, 12 Aug 1998 11:04:54 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA09315 for ; Wed, 12 Aug 1998 11:04:40 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id OAA09655; Wed, 12 Aug 1998 14:04:04 -0400 (EDT) (envelope-from luoqi) Date: Wed, 12 Aug 1998 14:04:04 -0400 (EDT) From: Luoqi Chen Message-Id: <199808121804.OAA09655@lor.watermarkgroup.com> To: luoqi@watermarkgroup.com, mal@algonet.se Subject: Re: SMP + Wine => panic Cc: freebsd-smp@FreeBSD.ORG Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > The last patches did cure the problem. It looks like the program > I wanted to run is a no-go, but that is a problem with wine, not freebsd. > > Thanks for the help! Tell me if you need help with more testing to get > the code committed to the main tree. > > _ > Mats Lofkvist > mal@algonet.se > Thanks for the testing result, it worked on my PC too. I don't know what exactly needs to be done to get the fix committed, I'll just file a PR and hopefully someone would take a look and commit it. -lq PS: I filed the PR and the number is i386/7591. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Aug 12 11:52:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA18808 for freebsd-smp-outgoing; Wed, 12 Aug 1998 11:52:01 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from marlin.corp.gulf.net (marlin.corp.gulf.net [198.69.72.17] (may be forged)) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA18794 for ; Wed, 12 Aug 1998 11:51:57 -0700 (PDT) (envelope-from tbackman@corp.gulf.net) Received: from marlin.corp.gulf.net (tbackman@marlin.corp.gulf.net [206.105.61.2]) by marlin.corp.gulf.net (8.8.8/8.8.5) with SMTP id NAA00985 for ; Wed, 12 Aug 1998 13:45:03 -0500 (CDT) Date: Wed, 12 Aug 1998 13:45:03 -0500 (CDT) From: Todd Backman To: freebsd-smp@FreeBSD.ORG Subject: PPRO vs. PII Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Has anyone done any price/performance evals. on PPRO 200 512k vs PII 2XX/3XX? ===================================================================== Todd Backman (tbackman@corp.gulf.net) Network Engineering Team Leader Systems/POP Administration Gulf Coast Internet Company 1-800-444-INET To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Aug 12 23:59:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA19247 for freebsd-smp-outgoing; Wed, 12 Aug 1998 23:59:42 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from hermes.hrz.uni-bielefeld.de (hermes.hrz.uni-bielefeld.de [129.70.4.55]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA19234 for ; Wed, 12 Aug 1998 23:59:39 -0700 (PDT) (envelope-from lkoeller@post.uni-bielefeld.de) Received: from mitch.hrz.uni-bielefeld.de (9134@mitch.hrz.uni-bielefeld.de [129.70.4.17]) by hermes.hrz.uni-bielefeld.de (8.8.6/8.8.6) with ESMTP id IAA21676 for ; Thu, 13 Aug 1998 08:59:14 +0200 (METDST) Received: from localhost by mitch.hrz.uni-bielefeld.de with SMTP (8.8.6/16.2) id GAA01921; Thu, 13 Aug 1998 06:59:06 GMT Message-Id: <199808130659.GAA01921@mitch.hrz.uni-bielefeld.de> X-Mailer: exmh version 2.0.2 2/24/98 From: Lars =?iso-8859-1?Q?K=F6ller?= To: freebsd-smp@FreeBSD.ORG Subject: Per processor load? X-Face: eCcoCV}FjV*O{6>[1$XP/e%]TJhEw2MF33dFh)^HM7Gfd=[/(4+0a$~ Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA02053 for freebsd-smp-outgoing; Thu, 13 Aug 1998 13:04:46 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from picnic.mat.net (picnic.mat.net [209.118.174.117]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA01719 for ; Thu, 13 Aug 1998 13:03:24 -0700 (PDT) (envelope-from chuckr@glue.umd.edu) Received: from localhost (chuckr@localhost) by picnic.mat.net (8.8.8/8.8.5) with SMTP id OAA18395; Thu, 13 Aug 1998 14:54:41 -0400 (EDT) Date: Thu, 13 Aug 1998 14:54:39 -0400 (EDT) From: Chuck Robey X-Sender: chuckr@picnic.mat.net To: Lars =?iso-8859-1?Q?K=F6ller?= cc: freebsd-smp@FreeBSD.ORG Subject: Re: Per processor load? In-Reply-To: <199808130659.GAA01921@mitch.hrz.uni-bielefeld.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by hub.freebsd.org id NAA02047 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 13 Aug 1998, Lars Köller wrote: > -------- > > Hi! > > I want to exptend my port of xperfmon++ with per processor load > charts for 3.X. Is it possible to get the number of processors with a > syscall? And more important, how to get the load per processor? The > getloadavg function returns only the averaged load! For my 2 processor SMP board, sysctl gives: hw.machine: i386 hw.model: Pentium Pro hw.ncpu: 2 I'd guess you want the last one, right? > > Regards > > Lars > -- > E-Mail: | Lars Köller > Lars.Koeller@Uni-Bielefeld.DE | UNIX Sysadmin > lkoeller@cc.FH-Lippe.DE | Computing Center > PGP-key: | University of Bielefeld > http://www.nic.surfnet.nl/pgp/pks-toplev.html | Germany > ----------- FreeBSD, what else? ---- http://www.freebsd.org ------------- > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-smp" in the body of the message > > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@glue.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run Journey2 and picnic (FreeBSD-current) (301) 220-2114 | and jaunt (NetBSD). ----------------------------+----------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message