From owner-freebsd-smp Sun Aug 10 03:08:06 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id DAA14544 for smp-outgoing; Sun, 10 Aug 1997 03:08:06 -0700 (PDT) Received: from groa.uct.ac.za (groa.uct.ac.za [137.158.128.7]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id DAA14470; Sun, 10 Aug 1997 03:07:45 -0700 (PDT) Received: from rv by groa.uct.ac.za with local (Exim 1.653 #1) id 0wxUu1-0005X3-00; Sun, 10 Aug 1997 12:07:13 +0200 Subject: Re: scsi time-out & lockup under smp To: jwd@unx.sas.com Date: Sun, 10 Aug 1997 12:07:12 +0200 (SAT) Cc: freebsd-current@freebsd.org, freebsd-smp@freebsd.org In-Reply-To: <199708091618.KAA06802@Ilsa.StevesCafe.com> from "Steve Passe" at Aug 9, 97 10:18:00 am X-Mailer: ELM [version 2.4 PL25] Content-Type: text Message-Id: From: Russell Vincent Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Steve Passe wrote: > Has anyone tried undefining PEND_INTS to fix this yet? Steve has gone off to sleep, so I thought I would get people caught up on the status of this. Last night I ran a machine with the latest kernel (the one with Steve's latest '3 locks' fix) and PEND_INTS undefined. The machine stayed up for 10 hours while doing its usual work of web cache and newsfeeds along with a make world. That seems to have fixed the problem. I have now defined PEND_INTS again and am running more tests. Nothing definite yet, but after a good hammering (_lots_ of CPU and disk activity) the machine is still running fine. I will know more within the next 12 hours, but it looks like the '3 locks' fix has solved the problem. Many thanks to Steve for helping out. -Russell From owner-freebsd-smp Mon Aug 11 09:34:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA14246 for smp-outgoing; Mon, 11 Aug 1997 09:34:03 -0700 (PDT) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA14228 for ; Mon, 11 Aug 1997 09:33:56 -0700 (PDT) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.6/8.8.5) with ESMTP id KAA15787; Mon, 11 Aug 1997 10:33:56 -0600 (MDT) Message-Id: <199708111633.KAA15787@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: smp@freebsd.org cc: Russell Vincent Subject: HEADS UP: good time to update SMP src Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 11 Aug 1997 10:33:56 -0600 Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, Russel reports: >disa:~#uptime > 3:09PM up 1 day, 4:44, 2 users, load averages: 0.72, 0.62, 0.53 > >Still going strong. I have made it work much harder every now >and then, so I would say the problem was fixed by the addition >of the 'lock' statements. PEND_INTS is currently defined >in the kernel. So I'm going to call it fixed. I commited this fix, the SMP src is as stable as its going to get for awhile. I have plans for new lock code that I will start to commit later this week, expect the usual breakage. In other words, come and get it while the getting is good! -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD From owner-freebsd-smp Mon Aug 11 12:25:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA24364 for smp-outgoing; Mon, 11 Aug 1997 12:25:19 -0700 (PDT) Received: from lamb.sas.com (daemon@lamb.sas.com [192.35.83.8]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id MAA24358 for ; Mon, 11 Aug 1997 12:25:15 -0700 (PDT) Received: from mozart by lamb.sas.com (5.65c/SAS/Gateway/01-23-95) id AA29339; Mon, 11 Aug 1997 15:25:12 -0400 Received: from iluvatar.unx.sas.com by mozart (5.65c/SAS/Domains/5-6-90) id AA19509; Mon, 11 Aug 1997 15:25:04 -0400 From: "John W. DeBoskey" Received: by iluvatar.unx.sas.com (5.65c/SAS/Generic 9.01/3-26-93) id AA02448; Mon, 11 Aug 1997 15:25:03 -0400 Message-Id: <199708111925.AA02448@iluvatar.unx.sas.com> Subject: General smp & bios questions To: smp@freebsd.org Date: Mon, 11 Aug 1997 15:25:03 -0400 (EDT) X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I've got a couple of questions, for what they're worth... My system has to I/O APIC's in it. The 2nd one is disabled by default in the bios. I also have an entry for 'PIC interrupt Routing', which is set to 'default'. The other choice is 'Through IO APIC'. Does any of this ring any bells? I've left the 2nd APIC disabled since I did not beleive that your code supported more than one of them. Thanks, John -- jwd@unx.sas.com (w) John W. De Boskey (919) 677-8000 x6915 From owner-freebsd-smp Mon Aug 11 12:43:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA25483 for smp-outgoing; Mon, 11 Aug 1997 12:43:29 -0700 (PDT) Received: from uhf.wdc.net (uhf.4d.net [207.137.157.140]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA25472 for ; Mon, 11 Aug 1997 12:43:17 -0700 (PDT) Received: from localhost (bad@localhost) by uhf.wdc.net (8.8.5/8.6.12) with SMTP id PAA02457; Mon, 11 Aug 1997 15:46:36 -0400 (EDT) Date: Mon, 11 Aug 1997 15:46:35 -0400 (EDT) From: Bernie Doehner X-Sender: bad@uhf.wdc.net To: "John W. DeBoskey" cc: smp@FreeBSD.ORG Subject: Re: General smp & bios questions In-Reply-To: <199708111925.AA02448@iluvatar.unx.sas.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk What's the brand/model of your board? Bernie From owner-freebsd-smp Mon Aug 11 21:00:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id VAA25493 for smp-outgoing; Mon, 11 Aug 1997 21:00:41 -0700 (PDT) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id VAA25488 for ; Mon, 11 Aug 1997 21:00:34 -0700 (PDT) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.6/8.8.5) with ESMTP id VAA17290; Mon, 11 Aug 1997 21:59:59 -0600 (MDT) Message-Id: <199708120359.VAA17290@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: "John W. DeBoskey" cc: smp@FreeBSD.ORG Subject: Re: General smp & bios questions In-reply-to: Your message of "Mon, 11 Aug 1997 15:25:03 EDT." <199708111925.AA02448@iluvatar.unx.sas.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 11 Aug 1997 21:59:59 -0600 Sender: owner-freebsd-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi, > I've got a couple of questions, for what they're worth... > > My system has to I/O APIC's in it. The 2nd one is disabled > by default in the bios. > > I also have an entry for 'PIC interrupt Routing', which is > set to 'default'. The other choice is 'Through IO APIC'. > > Does any of this ring any bells? I've left the 2nd APIC disabled > since I did not beleive that your code supported more than one > of them. leave the second APIC disabled, and use "Through IO APIC" -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD From owner-freebsd-smp Mon Aug 11 23:31:50 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA03661 for smp-outgoing; Mon, 11 Aug 1997 23:31:50 -0700 (PDT) Received: from scorpion.aracnet.com (root@scorpion.aracnet.com [205.159.88.23]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA03535 for ; Mon, 11 Aug 1997 23:27:46 -0700 (PDT) Received: from cbrowni2-home (ppp-h2.aracnet.com [205.238.12.195]) by scorpion.aracnet.com (8.8.5/8.8.5) with ESMTP id XAA07185 for ; Mon, 11 Aug 1997 23:26:49 -0700 Message-ID: <33F0021F.49BFE86@earthling.net> Date: Mon, 11 Aug 1997 23:26:39 -0700 From: Chris Browning Reply-To: cbrown@aracnet.com X-Mailer: Mozilla 4.01 [en] (WinNT; I) MIME-Version: 1.0 To: smp@FreeBSD.ORG Subject: Re: General smp & bios questions X-Priority: 3 (Normal) References: <199708120359.VAA17290@Ilsa.StevesCafe.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > My system has to I/O APIC's in it. The 2nd one is disabled > > by default in the bios. yeah, disabling the second I/O APIC is a pretty normal default. Some brain-dead OSes can't handle more than one. > > I also have an entry for 'PIC interrupt Routing', which is > > set to 'default'. The other choice is 'Through IO APIC'. Using the "Through IO APIC" allows the I/O APIC to deliever interrupts through the APIC bus. This is the prefered way of doing things. Otherwise, interrupts are "hardwired" to a particular processor. It doesn't matter too much since when the system is put into full SMP mode, you will leave whichever one you choose. Through the I/O APIC is closer to SMP :-). > > > > Does any of this ring any bells? Yes. I work with our BIOS group to help them use these features. > I've left the 2nd APIC disabled > > since I did not beleive that your code supported more than one > > of them. Now, this would be a shame. This is a major scalibility limiter. If possible, you should use the 2nd I/O APIC. Otherwise, you are losing several interrupts and are crowding the ISA compatibility interrupts unecessarily. > leave the second APIC disabled, and use "Through IO APIC" Any particular reason why? All of those extra interupts going to waste? I agree with the "Through IO APIC". Chris Not speaking for nobody. From owner-freebsd-smp Tue Aug 12 09:00:42 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA00576 for smp-outgoing; Tue, 12 Aug 1997 09:00:42 -0700 (PDT) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA00571 for ; Tue, 12 Aug 1997 09:00:36 -0700 (PDT) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.6/8.8.5) with ESMTP id KAA19412; Tue, 12 Aug 1997 10:00:24 -0600 (MDT) Message-Id: <199708121600.KAA19412@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: cbrown@aracnet.com cc: smp@FreeBSD.ORG Subject: Re: General smp & bios questions In-reply-to: Your message of "Mon, 11 Aug 1997 23:26:39 PDT." <33F0021F.49BFE86@earthling.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 12 Aug 1997 10:00:24 -0600 Sender: owner-freebsd-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi, > Using the "Through IO APIC" allows the I/O APIC to deliever > interrupts through the APIC bus. This is the prefered way of > doing things. Otherwise, interrupts are "hardwired" to a > particular processor. It doesn't matter too much since when > the system is put into full SMP mode, you will leave whichever > one you choose. Through the I/O APIC is closer to SMP :-). I have found this to be either untrue with some BIOS, or I don't know the magic to "make the crossover". Ie, I found it necessary to explicitly set "thru IO APIC" on my PR440FX. --- > Now, this would be a shame. This is a major scalibility limiter. > If possible, you should use the 2nd I/O APIC. Otherwise, you are > losing several interrupts and are crowding the ISA compatibility > interrupts unecessarily. > > > leave the second APIC disabled, and use "Through IO APIC" > > Any particular reason why? All of those extra interupts going to > waste? Because FreeBSD has a fundimental limit of 32 INT sources (they're stored in a int sized bitmask). I have about 90% of the code to support multiple APICs in place, but will have to do major surgery to get around the 32 source limit, there just isn't room in there to reference all the sources of 2 IO APICs + our software INTs: 24 + 24 + 4 + (more to come) -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD From owner-freebsd-smp Thu Aug 14 08:27:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA23625 for smp-outgoing; Thu, 14 Aug 1997 08:27:41 -0700 (PDT) Received: from critter.dk.tfs.com (critter.phk.freebsd.dk [195.8.129.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA23618 for ; Thu, 14 Aug 1997 08:27:37 -0700 (PDT) Received: from critter.dk.tfs.com (localhost [127.0.0.1]) by critter.dk.tfs.com (8.8.6/8.8.5) with ESMTP id RAA03400 for ; Thu, 14 Aug 1997 17:07:57 +0200 (CEST) To: smp@freebsd.org Subject: bug ? From: Poul-Henning Kamp Date: Thu, 14 Aug 1997 17:07:57 +0200 Message-ID: <3398.871571277@critter.dk.tfs.com> Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk this is from sys/kern/kern_lock.c, isn't line 76 & 77 bogus ? 64 | */ 65 | int lock_wait_time = 100; 66 | #define PAUSE(lkp, wanted) \ 67 | if (lock_wait_time > 0) { \ 68 | int i; \ 69 | \ 70 | simple_unlock(&lkp->lk_interlock); \ 71 | for (i = lock_wait_time; i > 0; i--) \ 72 | if (!(wanted)) \ 73 | break; \ 74 | simple_lock(&lkp->lk_interlock); \ 75 | } \ 76 | if (!(wanted)) \ 77 | break; 78 | 79 | #else /* NCPUS == 1 */ 80 | 81 | /* 82 | * It is an error to spin on a uniprocessor as nothing will ever cause 83 | * the simple lock to clear while we are executing. 84 | */ 85 | #define PAUSE(lkp, wanted) 86 | 87 | #endif /* NCPUS == 1 */ 88 | 89 | /* 90 | * Acquire a resource. 91 | */ 92 | #define ACQUIRE(lkp, error, extflags, wanted) \ 93 | PAUSE(lkp, wanted); \ 94 | for (error = 0; wanted; ) { \ 95 | (lkp)->lk_waitcount++; \ -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@tfs.com TRW Financial Systems, Inc. Future will arrive by its own means, progress not so. From owner-freebsd-smp Thu Aug 14 11:59:59 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA05902 for smp-outgoing; Thu, 14 Aug 1997 11:59:59 -0700 (PDT) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA05897 for ; Thu, 14 Aug 1997 11:59:53 -0700 (PDT) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.6/8.8.5) with ESMTP id MAA02252 for ; Thu, 14 Aug 1997 12:59:51 -0600 (MDT) Message-Id: <199708141859.MAA02252@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: smp@freebsd.org Subject: AMI Goliath motherboard Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 14 Aug 1997 12:59:51 -0600 Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, Is anyone using an AMI Goliath motherboard with the SMP kernel? Has anyone tried to use it but failed? -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD From owner-freebsd-smp Thu Aug 14 12:06:22 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA06198 for smp-outgoing; Thu, 14 Aug 1997 12:06:22 -0700 (PDT) Received: from critter.dk.tfs.com (critter.phk.freebsd.dk [195.8.129.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA06179 for ; Thu, 14 Aug 1997 12:06:14 -0700 (PDT) Received: from critter.dk.tfs.com (localhost [127.0.0.1]) by critter.dk.tfs.com (8.8.6/8.8.5) with ESMTP id VAA03670; Thu, 14 Aug 1997 21:05:26 +0200 (CEST) To: Steve Passe cc: Poul-Henning Kamp , smp@freebsd.org Subject: Re: bug ? In-reply-to: Your message of "Thu, 14 Aug 1997 12:05:09 MDT." <199708141805.MAA02086@Ilsa.StevesCafe.com> Date: Thu, 14 Aug 1997 21:05:26 +0200 Message-ID: <3668.871585526@critter.dk.tfs.com> From: Poul-Henning Kamp Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In message <199708141805.MAA02086@Ilsa.StevesCafe.com>, Steve Passe writes: >Hi, > >> >> this is from sys/kern/kern_lock.c, isn't line 76 & 77 bogus ? >> >> 64 | */ >> 65 | int lock_wait_time = 100; >> 66 | #define PAUSE(lkp, wanted) > \ >> 67 | if (lock_wait_time > 0) { > \ >> 68 | int i; > \ >> 69 | > \ >> 70 | simple_unlock(&lkp->lk_interlock); > \ >> 71 | for (i = lock_wait_time; i > 0; i--) > \ >> 72 | if (!(wanted)) > \ >> 73 | break; > \ >> 74 | simple_lock(&lkp->lk_interlock); > \ >> 75 | } > \ >> 76 | if (!(wanted)) > \ >> 77 | break; >> 78 | >> 79 | #else /* NCPUS == 1 */ > >I think it's necessary. In a multiprocessor system there is a chance >another CPU could grab the lock between lines 73 & 74. So line 76 is a >test to guarantee that its still "!(wanted)" after re-acquiring the >simple_lock. There is also the possibility that you timeout without getting >"wanted", line 76 deals with this. Ok, but what does the "break" break out of ? That's where it looks bogus to me... I also don't understand why you don't check at the top, but always take a simple_unlock/simple_lock pair, even in the best case situation.. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@tfs.com TRW Financial Systems, Inc. Power and ignorance is a disgusting cocktail. From owner-freebsd-smp Thu Aug 14 12:38:56 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA07986 for smp-outgoing; Thu, 14 Aug 1997 12:38:56 -0700 (PDT) Received: from sanjuan.cs.washington.edu (sanjuan.cs.washington.edu [128.95.8.118]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA07978 for ; Thu, 14 Aug 1997 12:38:52 -0700 (PDT) Received: from localhost (ulbright@localhost) by sanjuan.cs.washington.edu (8.8.5+CS/7.2ws+) with SMTP id MAA00091 for ; Thu, 14 Aug 1997 12:38:51 -0700 (PDT) Date: Thu, 14 Aug 1997 12:38:50 -0700 (PDT) From: Christopher Ulbright To: smp@FreeBSD.ORG Subject: DISABLE_PSE Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hello, I sent this earlier but fear it may have been lost, please forgive any redundancy. Can anyone provide a brief explanation of the purpose/function of the code in pmap.c that is prefaced by "#if !defined(DISABLE_PSE)". This code is in the pmap_bootstrap function. What are the ramifications of having DISABLE_PSE defined and not executing this code? Thanks. -Chris -------------------- o -/\-_ \\\\ (')\/(`) )))) ------------------------ From owner-freebsd-smp Thu Aug 14 12:45:15 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA08411 for smp-outgoing; Thu, 14 Aug 1997 12:45:15 -0700 (PDT) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA08403 for ; Thu, 14 Aug 1997 12:45:10 -0700 (PDT) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.6/8.8.5) with ESMTP id NAA02468; Thu, 14 Aug 1997 13:44:34 -0600 (MDT) Message-Id: <199708141944.NAA02468@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: Poul-Henning Kamp cc: Poul-Henning Kamp , smp@freebsd.org Subject: Re: bug ? In-reply-to: Your message of "Thu, 14 Aug 1997 21:05:26 +0200." <3668.871585526@critter.dk.tfs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 14 Aug 1997 13:44:34 -0600 Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Poul, > >> this is from sys/kern/kern_lock.c, isn't line 76 & 77 bogus ? > >> > >> 64 | */ > >> 65 | int lock_wait_time = 100; > >> 66 | #define PAUSE(lkp, wanted) > > \ > >> 67 | if (lock_wait_time > 0) { > > \ > >> 68 | int i; > > \ > >> 69 | > > \ > >> 70 | simple_unlock(&lkp->lk_interlock); > > \ > >> 71 | for (i = lock_wait_time; i > 0; i--) > > \ > >> 72 | if (!(wanted)) > > \ > >> 73 | break; > > \ > >> 74 | simple_lock(&lkp->lk_interlock); > > \ > >> 75 | } > > \ > >> 76 | if (!(wanted)) > > \ > >> 77 | break; > >> 78 | > >> 79 | #else /* NCPUS == 1 */ > > > >I think it's necessary. In a multiprocessor system there is a chance > >another CPU could grab the lock between lines 73 & 74. So line 76 is a > >test to guarantee that its still "!(wanted)" after re-acquiring the > >simple_lock. There is also the possibility that you timeout without getting > >"wanted", line 76 deals with this. > > Ok, but what does the "break" break out of ? First, I haven't spent any time reading this section of code bwfore today, so take anything I say as 'probably'. Second, I once was of the impression that the lite2 lockmanager code was well tested, but I now have my doubts about that so we need to look at everything in there with some suspicion. What "break" breaks out of obviosly depends on where the macro is used, but to use one example, look at: #define ACQUIRE(lkp, error, extflags, wanted) \ PAUSE(lkp, wanted); \ for (error = 0; wanted; ) { \ (lkp)->lk_waitcount++; \ simple_unlock(&(lkp)->lk_interlock); \ error = tsleep((void *)lkp, (lkp)->lk_prio, \ (lkp)->lk_wmesg, (lkp)->lk_timo); \ simple_lock(&(lkp)->lk_interlock); \ (lkp)->lk_waitcount--; \ if (error) \ break; \ if ((extflags) & LK_SLEEPFAIL) { \ error = ENOLCK; \ break; \ } \ } - here the 'break' bypasses the code which goes on to sleep on the lock. In other words, first we attempt to obtain the complex lock conditions we want (ie, wanted). if we get that within the PAUSE section we break out of whatever upper block contains the ACQUIRE/PAUSE macro. If we dont get the lock, we sleep on it in the following "for (error = 0; wanted; ) { ..." section. --- > That's where it looks bogus to me... > > I also don't understand why you don't check at the top, but always > take a simple_unlock/simple_lock pair, even in the best case situation.. I also can't see any reason why the check isn't done 1st, but as I said I am very unfamiliar with this section of code right now so I couldn't say whether this is corret or incorrect with any certainity. However it looks like its only an inefficiency, as oppossed to a flaw in the logic, so I would suggest leaving it alone for now till we get the lock manager working. Right now the kernel panics almost immediately if the lockmanager is turned on in the SMP kernel. -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD From owner-freebsd-smp Thu Aug 14 13:22:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id KAA01281 for smp-outgoing; Thu, 14 Aug 1997 10:30:23 -0700 (PDT) Received: from sanjuan.cs.washington.edu (sanjuan.cs.washington.edu [128.95.8.118]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id KAA01276 for ; Thu, 14 Aug 1997 10:30:20 -0700 (PDT) Received: from localhost (ulbright@localhost) by sanjuan.cs.washington.edu (8.8.5+CS/7.2ws+) with SMTP id KAA00317 for ; Thu, 14 Aug 1997 10:30:19 -0700 (PDT) Date: Thu, 14 Aug 1997 10:30:19 -0700 (PDT) From: Christopher Ulbright To: smp@freebsd.org Subject: DISABLE_PSE Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello, Can anyone explain the function of the code within the pmap_bootstrap function in pmap.c which is prefaced by "#if !defined(DISABLE_PSE)"? I'm curious what are the ramifications if DISABLE_PSE is defined and this code isn't executed. Thanks. -chris ulbright From owner-freebsd-smp Thu Aug 14 13:22:34 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA03166 for smp-outgoing; Thu, 14 Aug 1997 11:06:07 -0700 (PDT) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA03153 for ; Thu, 14 Aug 1997 11:05:49 -0700 (PDT) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.6/8.8.5) with ESMTP id MAA02086; Thu, 14 Aug 1997 12:05:09 -0600 (MDT) Message-Id: <199708141805.MAA02086@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: Poul-Henning Kamp cc: smp@freebsd.org Subject: Re: bug ? In-reply-to: Your message of "Thu, 14 Aug 1997 17:07:57 +0200." <3398.871571277@critter.dk.tfs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 14 Aug 1997 12:05:09 -0600 Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, > > this is from sys/kern/kern_lock.c, isn't line 76 & 77 bogus ? > > 64 | */ > 65 | int lock_wait_time = 100; > 66 | #define PAUSE(lkp, wanted) \ > 67 | if (lock_wait_time > 0) { \ > 68 | int i; \ > 69 | \ > 70 | simple_unlock(&lkp->lk_interlock); \ > 71 | for (i = lock_wait_time; i > 0; i--) \ > 72 | if (!(wanted)) \ > 73 | break; \ > 74 | simple_lock(&lkp->lk_interlock); \ > 75 | } \ > 76 | if (!(wanted)) \ > 77 | break; > 78 | > 79 | #else /* NCPUS == 1 */ I think it's necessary. In a multiprocessor system there is a chance another CPU could grab the lock between lines 73 & 74. So line 76 is a test to guarantee that its still "!(wanted)" after re-acquiring the simple_lock. There is also the possibility that you timeout without getting "wanted", line 76 deals with this. -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD From owner-freebsd-smp Thu Aug 14 13:33:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA11709 for smp-outgoing; Thu, 14 Aug 1997 13:33:19 -0700 (PDT) Received: from iquest3.iquest.net (iquest3.iquest.net [209.43.20.203]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id NAA11704 for ; Thu, 14 Aug 1997 13:33:16 -0700 (PDT) From: dyson@iquest.net Received: (qmail 13325 invoked from network); 14 Aug 1997 20:33:12 -0000 Received: from iquest7.iquest.net (206.53.230.110) by iquest3.iquest.net with SMTP; 14 Aug 1997 20:33:12 -0000 Received: (qmail 12115 invoked by uid 4420); 14 Aug 1997 20:33:14 -0000 Message-ID: <19970814203314.12114.qmail@iquest7.iquest.net> Subject: Re: DISABLE_PSE To: ulbright@cs.washington.edu (Christopher Ulbright) Date: Thu, 14 Aug 1997 15:33:13 -0500 (EST) Cc: smp@FreeBSD.ORG In-Reply-To: from "Christopher Ulbright" at Aug 14, 97 10:30:19 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Hello, > > Can anyone explain the function of the code within the pmap_bootstrap > function in pmap.c which is prefaced by "#if !defined(DISABLE_PSE)"? > > I'm curious what are the ramifications if DISABLE_PSE is defined and this > code isn't executed. > The PSE option (ability of the more advanced Intel chips) allows for entire 4MB (or 2MB) regions to be mapped at once. This conserves the usage of TLB entries, and makes a marginal performance improvement. John From owner-freebsd-smp Thu Aug 14 14:39:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA15019 for smp-outgoing; Thu, 14 Aug 1997 14:39:39 -0700 (PDT) Received: from critter.dk.tfs.com (critter.phk.freebsd.dk [195.8.129.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA14985 for ; Thu, 14 Aug 1997 14:39:19 -0700 (PDT) Received: from critter.dk.tfs.com (localhost [127.0.0.1]) by critter.dk.tfs.com (8.8.6/8.8.5) with ESMTP id XAA03869; Thu, 14 Aug 1997 23:38:23 +0200 (CEST) To: Steve Passe cc: Poul-Henning Kamp , smp@freebsd.org Subject: Re: bug ? In-reply-to: Your message of "Thu, 14 Aug 1997 13:44:34 MDT." <199708141944.NAA02468@Ilsa.StevesCafe.com> Date: Thu, 14 Aug 1997 23:38:23 +0200 Message-ID: <3867.871594703@critter.dk.tfs.com> From: Poul-Henning Kamp Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >First, I haven't spent any time reading this section of code bwfore today, >so take anything I say as 'probably'. Second, I once was of the impression >that the lite2 lockmanager code was well tested, but I now have my doubts >about that so we need to look at everything in there with some suspicion. Ohh, sorry, I mistakenly thought that PAUSE was one of your additions. >What "break" breaks out of obviosly depends on where the macro is used, but >to use one example, look at: > >#define ACQUIRE(lkp, error, extflags, wanted) \ > PAUSE(lkp, wanted); \ > for (error = 0; wanted; ) { \ > (lkp)->lk_waitcount++; \ > simple_unlock(&(lkp)->lk_interlock); \ > error = tsleep((void *)lkp, (lkp)->lk_prio, \ > (lkp)->lk_wmesg, (lkp)->lk_timo); \ > simple_lock(&(lkp)->lk_interlock); \ > (lkp)->lk_waitcount--; \ > if (error) \ > break; \ > if ((extflags) & LK_SLEEPFAIL) { \ > error = ENOLCK; \ > break; \ > } \ > } > >- >here the 'break' bypasses the code which goes on to sleep on the lock. Worse, it breaks out of the switch statement down in lockmgr() :-( >Right now the kernel panics almost immediately if the lockmanager is >turned on in the SMP kernel. For a good reason I think. Well, flag that construct, and look into it when you get there, I just happened to look at it by accident. Poul-Henning -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@tfs.com TRW Financial Systems, Inc. Power and ignorance is a disgusting cocktail. From owner-freebsd-smp Thu Aug 14 16:53:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA22272 for smp-outgoing; Thu, 14 Aug 1997 16:53:28 -0700 (PDT) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA22260 for ; Thu, 14 Aug 1997 16:53:17 -0700 (PDT) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.6/8.8.5) with ESMTP id RAA03600 for ; Thu, 14 Aug 1997 17:52:17 -0600 (MDT) Message-Id: <199708142352.RAA03600@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: smp@freebsd.org Subject: 4 CPU machines Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 14 Aug 1997 17:52:17 -0600 Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I would REALLY appreciate hearing from anyone who is currently running any flavor of 4 CPU SMP kernel. - P5s or P6s? - motherboard make & model. - disk controller make & model. - approximate date of last src update. - anything special that needed to be done to get it working? Anyone who attempted it but couldn't get it to work? If so, with approx. what date src? -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD From owner-freebsd-smp Thu Aug 14 19:43:57 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id TAA01709 for smp-outgoing; Thu, 14 Aug 1997 19:43:57 -0700 (PDT) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA01704 for ; Thu, 14 Aug 1997 19:43:54 -0700 (PDT) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.6/8.8.5) with ESMTP id UAA04516; Thu, 14 Aug 1997 20:42:37 -0600 (MDT) Message-Id: <199708150242.UAA04516@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: "Thomas D. Dean" cc: Dirk Roehrdanz , Bruce Albrecht , smp@freebsd.org Subject: Re: Trap 9 When Boot SMP Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 14 Aug 1997 20:42:37 -0600 Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi all, I just committed code to fix this properly. The relevant files are: i386/include/smp.h: $Id: smp.h,v 1.25 1997/08/15 02:34:32 fsmp Exp $ kern/init_main.c: $Id: init_main.c,v 1.69 1997/08/15 02:33:30 fsmp Exp $ kern/init_smp.c: $Id: init_smp.c,v 1.15 1997/08/15 02:33:30 fsmp Exp $ Please let me know if they work for you. Dean, after talking to David, they changed yet again, but I'm pretty sure their close enough to what you have to be ok... -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD From owner-freebsd-smp Fri Aug 15 22:55:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA09261 for smp-outgoing; Fri, 15 Aug 1997 22:55:41 -0700 (PDT) Received: from sendero-ppp.i-connect.net (sendero-ppp.i-Connect.Net [206.190.143.100]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id WAA09256 for ; Fri, 15 Aug 1997 22:55:39 -0700 (PDT) Received: (qmail 1453 invoked by uid 1000); 16 Aug 1997 05:55:50 -0000 Message-ID: X-Mailer: XFMail 1.2-alpha [p0] on FreeBSD Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Fri, 15 Aug 1997 22:55:50 -0700 (PDT) Organization: Atlas Telecom From: Simon Shapiro To: FreeBSD-SMP@FreeBSD.org, Steve Passe Subject: Open Issues on P6DNH Sender: owner-freebsd-smp@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Hi Steve, Sorry for the long delay. Had to design and code a new filesystem type, fight a bunch of political battles, and get a misely raise after a wonderful review (``words are cheaper than cash'', was my comment). Hope you are doing well. * Although it compiles, the SoundBlaster driver is less than functional; cat foo.au > /dev/audio just hangs there. Works fine under UP on the same platform. * The fxp driver seems to not get interrupts at all. Everything times out eventually and works like a very slow polled system. This happens IN FRONT of the i960 bridge. The fpa (fddi) driver, the DPT driver all work fine. * If you put COM4 on irq 7 it is there, on irq 9 it is not found. A conflict with the sb? The sb is mapped at 220. com4 is 2e8. * Something strange. Booted SMP, started X11, xperfmon++ insisted that libXaw was not there if ``shimon'' tried to tun it. Was there if root ran it. Permissions? Nope. I re-ompiled and re-installed it. Now root could see the executable (in /usr/X11R6/bin) but not ``shimon''. Rebooted and both are fine. Never seen this one before. * Interrupt latency is still not so hot. The typical DPT driver in UP serves an interrupt in 3-55us. in SMP it takes 11-1000039us. * I am getting an enormous number of spurious interrupts. In UP the typical count is 0 aborted (due to errors) and 1 for spurious (int routine was called but hardware said ``not me''. In SMP, the numbrs are 0 and 62090. The 1 spurious is explainable ( a bug in transitioning from polled mode to interrupt mode during boot. If there is anything I can do to help, let me know. I have sendero-ppp now run smp. I have another machine I will setup tomorrow (new Brass) which will be the same hardware. Simon