From owner-freebsd-smp Sun Sep 8 5:32:32 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF0F237B400 for ; Sun, 8 Sep 2002 05:32:23 -0700 (PDT) Received: from prinz.fujimori.cache.waseda.ac.jp (prinz.fujimori.cache.waseda.ac.jp [133.9.152.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7CB843E65 for ; Sun, 8 Sep 2002 05:32:22 -0700 (PDT) (envelope-from fujimori@prinz.fujimori.cache.waseda.ac.jp) Received: from prinz.fujimori.cache.waseda.ac.jp (localhost [127.0.0.1]) by prinz.fujimori.cache.waseda.ac.jp (8.11.6/8.11.6) with ESMTP id g88CWHs63265; Sun, 8 Sep 2002 21:32:17 +0900 (JST) (envelope-from fujimori@prinz.fujimori.cache.waseda.ac.jp) Message-Id: <200209081232.g88CWHs63265@prinz.fujimori.cache.waseda.ac.jp> To: Barney Wolff Cc: freebsd-smp@freebsd.org Subject: Re: AHA39160 In-reply-to: Your message of "Fri, 06 Sep 2002 16:15:05 -0400." <20020906201505.GA43097@tp.databus.com> Date: Sun, 08 Sep 2002 21:32:17 +0900 From: Yoriaki FUJIMORI 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 Thanks. I tunefs'ed on related directories, and file access has been much improved. Meanwhile, I did not see my opriginal post, somehow. Yoriaki Fujimori To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sun Sep 8 10:23:38 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 877CC37B400 for ; Sun, 8 Sep 2002 10:23:36 -0700 (PDT) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64A1043E42 for ; Sun, 8 Sep 2002 10:23:35 -0700 (PDT) (envelope-from tamaru@myn.rcast.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 811582180D9 for ; Mon, 9 Sep 2002 02:23:34 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id g88HNYB12009 for ; Mon, 9 Sep 2002 02:23:34 +0900 Received: from gin.myn.rcast.u-tokyo.ac.jp (cognac.myn.rcast.u-tokyo.ac.jp [157.82.66.106]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AGY17989; Mon, 9 Sep 2002 02:23:33 +0900 (JST) Date: Mon, 09 Sep 2002 02:23:54 +0900 Message-ID: From: Hiroharu Tamaru To: Subject: Re: AMD760MPX and FreeBSD SMP? In-Reply-To: <00f701c254ea$0f930910$3401830a@Buildt.com> References: <442159807.20020904152900@FromRU.com> <00f701c254ea$0f930910$3401830a@Buildt.com> User-Agent: Wanderlust/2.8.1 (Something) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryae) APEL/10.3 Emacs/20.7 (i386--freebsd) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII 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 At Thu, 5 Sep 2002 08:39:37 -0600, Peter Lenhart wrote: > > I don't know which way he meant it, but the older XP's (1600's) ran just > fine dual in the tiger tyan board we have. I tried the newer ones (2000's) > but the board won't even post. I am guessing AMD has disabled this ability > in later processors. > > Of course you would normally want to run the MP's for a number of reasons. This is not a direct information at all, but what I heard is that it is true only for the very first few lots of XP's of 1500+ - 1800+ range. It could also had been just for the first engineering sample lots. Just FYI. -- Hiroharu Tamaru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Mon Sep 9 10: 1:25 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F7FC37B400 for ; Mon, 9 Sep 2002 10:01:23 -0700 (PDT) Received: from ignatius.schwartz-pr.com (ignatius.schwartz-pr.com [12.30.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id D378543E4A for ; Mon, 9 Sep 2002 10:01:22 -0700 (PDT) (envelope-from jfiorelli@schwartz-pr.com) Received: from dhcp-hst2-81.schwartz-pr.com (dhcp-hst2-81.schwartz-pr.com [12.30.3.81]) by ignatius.schwartz-pr.com (Postfix) with ESMTP id 2413761B for ; Mon, 9 Sep 2002 13:01:21 -0400 (EDT) Subject: Problems Compiling Kernel with SMP and Intel L440GX+ From: Jess Fiorelli To: freebsd-smp@freebsd.org Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 09 Sep 2002 12:49:58 -0400 Message-Id: <1031590199.7225.279.camel@dhcp-hst2-81> Mime-Version: 1.0 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 Hello. I wrote to the list about this about a month ago, but I still haven't been able to get it working, so I thought I'd try again. I got a few suggestions to try to hard boot the machine, but unfortuantely that didn't help. Here's the problem: I'm trying to compile a new kernel that includes SMP support. I'm using version 4.6. After I make the new kernel and install it, then reboot, I get an error message that says: Panic: mpfps Base Table HOSED! mplock=0000000b; cpuid=0; lapic.id=00000000 The machine has an Intel L440GX+ motherboard with Dual Pentium-III 500 processors, 1 gig of ram and 3 9 gig U2 SCSI drives in a raid using the Adaptec 2100C raid card and built in hotswap bays. The bios/hotswap etc on the motherboard has been updated to the newest versions. These are the two numbers on the motherboard, I'm not sure which is the model number and which is the serial number IMLW94303040 and AA 721242-008 Does anyone have any advice on what to try next? I can boot from the same kernel config, without the SMP options, but during the mornings when everyone gets into the office and starts checking email, the server takes a beating. I never get an error when I build the kernel with SMP, it just dies when I try to boot from it and search on google didn't turn up much helpful stuff thanks Jess To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Sep 10 8:57:10 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61BBA37B400 for ; Tue, 10 Sep 2002 08:57:09 -0700 (PDT) Received: from cod.mar.dfo-mpo.gc.ca (cod.mar.dfo-mpo.gc.ca [142.176.61.253]) by mx1.FreeBSD.org (Postfix) with SMTP id F1B7843E65 for ; Tue, 10 Sep 2002 08:57:07 -0700 (PDT) (envelope-from CampbellG@mar.dfo-mpo.gc.ca) Received: id MAA06574; Tue, 10 Sep 2002 12:47:32 -0300 Received: by gateway id <0H2800AH0BVHB0@bionet.bio.dfo.ca> for smp@freebsd.org; Tue, 10 Sep 2002 12:47:41 -0300 (ADT) Received: by gateway id ; Tue, 10 Sep 2002 12:47:41 -0300 Content-return: allowed Date: Tue, 10 Sep 2002 12:47:41 -0300 From: "Campbell, Glenn" Subject: Intel SE7500CW2 Mainboard SMP Problems To: smp@freebsd.org Message-id: <93FC2E7CA4507340BD77D154DD11B8AA253863@MARSYDE01> MIME-version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-type: text/plain; charset="iso-8859-1" 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 Hi - I thought I would just ask again if anyone has any ideas on a fix for the problem with the Intel SE7500CW2. Many users have posted in various FreeBSD lists that they cannot get BSD to boot the 2nd CPU (with 4.4 and 4.6.2). I, as well as others have tried flashing the bios but this has not fixed the problem. The kernel panics when it tries to turn the 2nd CPU up. We have also tried fixes as follows: http://groups.google.com/groups?q=freebsd+se7500cw2&hl=en&lr=&ie=UTF-8&oe=UT F-8&selm=akffuo%2410jo%241%40FreeBSD.csie.NCTU.edu.tw&rnum=5 None of these possible fixes worked. We know it is an mp_table problem. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Sep 10 11:53:26 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C64B37B400; Tue, 10 Sep 2002 11:53:23 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E78643E65; Tue, 10 Sep 2002 11:53:22 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id OAA10200; Tue, 10 Sep 2002 14:53:21 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g8AIqpj69046; Tue, 10 Sep 2002 14:52:51 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15742.16259.883414.449683@grasshopper.cs.duke.edu> Date: Tue, 10 Sep 2002 14:52:51 -0400 (EDT) To: "Campbell, Glenn" Cc: smp@freebsd.org Subject: Re: Intel SE7500CW2 Mainboard SMP Problems In-Reply-To: <93FC2E7CA4507340BD77D154DD11B8AA253863@MARSYDE01> References: <93FC2E7CA4507340BD77D154DD11B8AA253863@MARSYDE01> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid 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 Campbell, Glenn writes: > Hi - > > I thought I would just ask again if anyone has any ideas on a fix for the > problem with the Intel SE7500CW2. Many users have posted in various FreeBSD > lists that they cannot get BSD to boot the 2nd CPU (with 4.4 and 4.6.2). I, > as well as others have tried flashing the bios but this has not fixed the > problem. The kernel panics when it tries to turn the 2nd CPU up. We have > also tried fixes as follows: > > http://groups.google.com/groups?q=freebsd+se7500cw2&hl=en&lr=&ie=UTF-8&oe=UT > F-8&selm=akffuo%2410jo%241%40FreeBSD.csie.NCTU.edu.tw&rnum=5 > > None of these possible fixes worked. > > We know it is an mp_table problem. From the mptable that people are posting: MP Config Base Table Entries: -- Processors: APIC ID Version State Family Model Step Flags 0 0x14 BSP, usable 15 2 4 0x3febfbff 6 0x14 AP, usable 15 2 4 0x3febfbff -- I've never seen an MP box where the AP is at physical id 6. Is it possible our AP spinup code has never been tried with CPUs at anything other than the next physical id (eg, 1)? Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Sep 10 14: 7: 6 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8389737B4BD for ; Tue, 10 Sep 2002 14:07:00 -0700 (PDT) Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.120.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D97043E4A for ; Tue, 10 Sep 2002 14:07:00 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0098.cvx21-bradley.dialup.earthlink.net ([209.179.192.98] helo=mindspring.com) by harrier.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17osDX-0006OH-00; Tue, 10 Sep 2002 14:06:40 -0700 Message-ID: <3D7E5EA1.C7DA0077@mindspring.com> Date: Tue, 10 Sep 2002 14:05:37 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "Campbell, Glenn" Cc: smp@freebsd.org Subject: Re: Intel SE7500CW2 Mainboard SMP Problems References: <93FC2E7CA4507340BD77D154DD11B8AA253863@MARSYDE01> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 "Campbell, Glenn" wrote: > I thought I would just ask again if anyone has any ideas on a fix for the > problem with the Intel SE7500CW2. Many users have posted in various FreeBSD > lists that they cannot get BSD to boot the 2nd CPU (with 4.4 and 4.6.2). I, > as well as others have tried flashing the bios but this has not fixed the > problem. The kernel panics when it tries to turn the 2nd CPU up. We have > also tried fixes as follows: [...] > We know it is an mp_table problem. If you know that, then it's possible for you to override the mptable with the correct values, assuming you know them. See the list archives for details; it's been a while since this topic came up on the freebsd-smp list, so I don't have a direct reference, sorry. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Sep 10 14:58:51 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 752A237B400 for ; Tue, 10 Sep 2002 14:58:47 -0700 (PDT) Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1295743E6E for ; Tue, 10 Sep 2002 14:58:47 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0098.cvx21-bradley.dialup.earthlink.net ([209.179.192.98] helo=mindspring.com) by gull.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17ot1w-0003ai-00; Tue, 10 Sep 2002 14:58:44 -0700 Message-ID: <3D7E6ACD.D066E865@mindspring.com> Date: Tue, 10 Sep 2002 14:57:33 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Andrew Gallatin Cc: "Campbell, Glenn" , smp@freebsd.org Subject: Re: Intel SE7500CW2 Mainboard SMP Problems References: <93FC2E7CA4507340BD77D154DD11B8AA253863@MARSYDE01> <15742.16259.883414.449683@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Andrew Gallatin wrote: > >From the mptable that people are posting: > > MP Config Base Table Entries: > > -- > Processors: APIC ID Version State Family Model Step Flags > 0 0x14 BSP, usable 15 2 4 0x3febfbff > 6 0x14 AP, usable 15 2 4 0x3febfbff > -- > > I've never seen an MP box where the AP is at physical id 6. > > Is it possible our AP spinup code has never been tried with CPUs at > anything other than the next physical id (eg, 1)? This was not the case historically. AP on 6 was the standard for the boards PHK and Jack Vogel had. I know that there was code to rewrite the APIC ID to linearize them, at one time. Is it now being assumed that it's linear? The ID is basically assigned by the BIOS, and is supposed to be a number between 0 and 31, with no guarantee of adjacency or anything... -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Sep 10 16:27:33 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B55637B400 for ; Tue, 10 Sep 2002 16:27:31 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id A84A943E3B for ; Tue, 10 Sep 2002 16:27:30 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id TAA21281; Tue, 10 Sep 2002 19:27:29 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g8ANQxG69272; Tue, 10 Sep 2002 19:26:59 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15742.32707.183751.698741@grasshopper.cs.duke.edu> Date: Tue, 10 Sep 2002 19:26:59 -0400 (EDT) To: Terry Lambert Cc: "Campbell, Glenn" , smp@freebsd.org Subject: Re: Intel SE7500CW2 Mainboard SMP Problems In-Reply-To: <3D7E6ACD.D066E865@mindspring.com> References: <93FC2E7CA4507340BD77D154DD11B8AA253863@MARSYDE01> <15742.16259.883414.449683@grasshopper.cs.duke.edu> <3D7E6ACD.D066E865@mindspring.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid 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 Terry Lambert writes: > > Is it possible our AP spinup code has never been tried with CPUs at > > anything other than the next physical id (eg, 1)? > > This was not the case historically. AP on 6 was the standard > for the boards PHK and Jack Vogel had. I know that there was > code to rewrite the APIC ID to linearize them, at one time. > > Is it now being assumed that it's linear? The ID is basically Not that I know -- it was just a WAG. All the x86 mp boards I've seen have had the first AP at #1, so I was assuming there might be a problem. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Sep 11 8:38:58 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9798E37B400 for ; Wed, 11 Sep 2002 08:38:55 -0700 (PDT) Received: from iguana.icir.org (iguana.icir.org [192.150.187.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54CEE43E4A for ; Wed, 11 Sep 2002 08:38:55 -0700 (PDT) (envelope-from rizzo@iguana.icir.org) Received: from iguana.icir.org (localhost [127.0.0.1]) by iguana.icir.org (8.12.3/8.11.3) with ESMTP id g8BFcsIb090604; Wed, 11 Sep 2002 08:38:54 -0700 (PDT) (envelope-from rizzo@iguana.icir.org) Received: (from rizzo@localhost) by iguana.icir.org (8.12.3/8.12.3/Submit) id g8BFcsmL090603; Wed, 11 Sep 2002 08:38:54 -0700 (PDT) (envelope-from rizzo) Date: Wed, 11 Sep 2002 08:38:54 -0700 From: Luigi Rizzo To: smp@freebsd.org Subject: wakeup handling on SMP boxes Message-ID: <20020911083854.A88921@iguana.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i 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 Hi, I have a question about the handling of wakeup on SMP machine. (I am looking at RELENG_4, but i believe the same thing happens on CURRENT with threads instead of processes). Imagine the following situation -- all CPUs are running cpu-bound processes (say, all with the same priority), and at some point a wakeup() is invoked which awakes one or more sleeping processes. My understanding of the behaviour is that: + the processor handling the wakeup will suspend the curproc and, eventually, invoke need_resched(); + on this same processor, the priority of the newly awaken process is compared with the one of the suspended process; + if the comparison succeeds, the suspended process is preempted and the new one runs; otherwise, the new process will have a chance at the next voluntary descheduling or roundrobin(); Am I correct ? This seems to suggest that the priority ordering might be violated for as much as kern.quantum, after which the roundrobin() and forward_roundrobin() will do the right thing. The only reason why this more or less works in practice is that the sleeping process likely has raised its priority in the tsleep() call, so it will preempt the process running on the processor handling the wakeup(). On the other hand, there is no guarantee that this process is the one with the lowest priority among those currently running. I guess to fix this one would need to determine if one of the processes needs to be kicked out and replaced with the new one, by invoking an Xcpuast IPI on the specific processor. Any reason why this is not done ? Is the call too expensive so one prefers to tolerate the temporary inconsistency ? cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Sep 11 9:43:13 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A0E737B400 for ; Wed, 11 Sep 2002 09:43:09 -0700 (PDT) Received: from swan.mail.pas.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DF9743E4A for ; Wed, 11 Sep 2002 09:43:08 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0427.cvx21-bradley.dialup.earthlink.net ([209.179.193.172] helo=mindspring.com) by swan.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17pAZz-0006oG-00; Wed, 11 Sep 2002 09:43:04 -0700 Message-ID: <3D7F723A.7B49E8E0@mindspring.com> Date: Wed, 11 Sep 2002 09:41:30 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Luigi Rizzo Cc: smp@freebsd.org Subject: Re: wakeup handling on SMP boxes References: <20020911083854.A88921@iguana.icir.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Luigi Rizzo wrote: > I have a question about the handling of wakeup on SMP machine. > (I am looking at RELENG_4, but i believe the same thing happens > on CURRENT with threads instead of processes). > > Imagine the following situation -- all CPUs are running cpu-bound > processes (say, all with the same priority), and at some point a > wakeup() is invoked which awakes one or more sleeping processes. > > My understanding of the behaviour is that: > > + the processor handling the wakeup will suspend the > curproc and, eventually, invoke need_resched(); > > + on this same processor, the priority of the newly awaken process > is compared with the one of the suspended process; > > + if the comparison succeeds, the suspended process is preempted > and the new one runs; otherwise, the new process will have a > chance at the next voluntary descheduling or roundrobin(); > > Am I correct ? > This seems to suggest that the priority ordering might be violated > for as much as kern.quantum, after which the roundrobin() and > forward_roundrobin() will do the right thing. Yes, this is correct. This is an implicit problem with a pull-based CPU migration model for processes, along with requiring locking in the scheduler in the common code path. The only way to get around this is to convert to a push-based CPU migration model, instead. There are still going to be introduced latency issues for the migrated process in that case, as well, if the average process' CPU utilization is highly variant between CPUs by more than 50% of a quantum difference for the mean value. This can be mitigated statistically by providing an artificial per CPU figure of merit boost following a migration, to reduce the probability of it becoming the common target of additional migrations, until it does a figure of merit recalculation at the next rescheduling event. > The only reason why this more or less works in practice is that the > sleeping process likely has raised its priority in the tsleep() > call, so it will preempt the process running on the processor > handling the wakeup(). On the other hand, there is no guarantee > that this process is the one with the lowest priority among those > currently running. In practice, where you have N+1 processes, on average, in a ready to run state, and you have N CPUs, there is still a likelihood of starvation occurring. The same likelihood is present at every modulus of the number of ready-to-run processes-plus-one, whose remainder is zero. It "works" on average because no one really notices the stalls, in practice, because of the relative ability of humans to notice things at 100ms granularity. 8-). > I guess to fix this one would need to determine if one of the > processes needs to be kicked out and replaced with the new one, > by invoking an Xcpuast IPI on the specific processor. > > Any reason why this is not done ? Is the call too expensive so > one prefers to tolerate the temporary inconsistency ? This would not fix the problem, because you would introduce stalls by triggering the IPI. The only effect this would have is to average out the pain, so that it's less noticible, rather than actually getting rid of it. I rather expect that this isn't done because optimizing the current code, when there is a publically stated architectural intent to replace it, is kind of a waste of time. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Sep 11 11:41:22 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43E6637B400; Wed, 11 Sep 2002 11:41:00 -0700 (PDT) Received: from hotmail.com (oe42.law3.hotmail.com [209.185.240.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2107843E72; Wed, 11 Sep 2002 11:40:59 -0700 (PDT) (envelope-from doooks@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 11 Sep 2002 11:40:57 -0700 X-Originating-IP: [216.191.173.83] From: "Neil Bahroos" To: Cc: , Subject: SMPng with FreeBSD 4.6.2 with USB Date: Wed, 11 Sep 2002 14:40:55 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: X-OriginalArrivalTime: 11 Sep 2002 18:40:57.0980 (UTC) FILETIME=[C4C88BC0:01C259C2] 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 Hello freebsd.org, I am trying to run the SMP kernel on a Abit VP6 DUAL pIII (800MHZ). I have no problems booting and getting the system going if using ps/2 keyboard. If I happen to use a USB keyboard then the console goes haywire. I can still use this machine via the network by ssh'ing to it. I dont know if the problem is on my end, or you have just not tested the SMP kernel with USB keyboard setup. The USB keyboard I am using is a Microsoft IntelliKeyboard Pro, it has a 2 port USB hub built in, to which I connect my MS USB, intellimouse. I have commented out cpu i386, i486, and i586 as recommended in the LINT kernel file. My mptable output follows (done from GENERIC UP kernel) along with dmesg output. Thankyou, Neil Bahroos > mptable ============================================================================ === MPTable, version 2.0.15 ---------------------------------------------------------------------------- --- MP Floating Pointer Structure: location: BIOS physical address: 0x000f5700 signature: '_MP_' length: 16 bytes version: 1.4 checksum: 0x7d mode: Virtual Wire ---------------------------------------------------------------------------- --- MP Config Table Header: physical address: 0x000f1400 signature: 'PCMP' base table length: 292 version: 1.4 checksum: 0x2b OEM ID: 'OEM00000' Product ID: 'PROD00000000' OEM table pointer: 0x00000000 OEM table size: 0 entry count: 28 local APIC address: 0xfee00000 extended table length: 0 extended table checksum: 0 ---------------------------------------------------------------------------- --- MP Config Base Table Entries: -- Processors: APIC ID Version State Family Model Step Flags 0 0x11 BSP, usable 6 8 10 0xfbff 1 0x11 AP, usable 6 8 6 0xfbff -- Bus: Bus ID Type 0 PCI 1 PCI 2 ISA -- I/O APICs: APIC ID Version State Address 2 0x11 usable 0xfec00000 -- I/O Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# ExtINT conforms conforms 2 0 2 0 INT conforms conforms 2 1 2 1 INT conforms conforms 2 0 2 2 INT conforms conforms 2 3 2 3 INT conforms conforms 2 4 2 4 INT conforms conforms 2 6 2 6 INT conforms conforms 2 7 2 7 INT active-hi edge 2 8 2 8 INT conforms conforms 2 9 2 9 INT conforms conforms 2 13 2 13 INT conforms conforms 2 14 2 14 INT conforms conforms 2 15 2 15 INT active-lo level 0 7:D 2 19 INT active-lo level 0 7:D 2 19 INT active-lo level 0 10:A 2 17 INT active-lo level 0 12:A 2 19 INT active-lo level 0 13:A 2 18 INT active-lo level 0 14:A 2 18 INT active-lo level 1 0:A 2 16 SMI conforms conforms 2 0 2 23 -- Local Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# ExtINT conforms conforms 0 0:A 255 0 NMI conforms conforms 0 0:A 255 1 ============================================================================ === > dmesg Copyright (c) 1992-2002 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.6.2-RELEASE #0: Wed Aug 14 21:23:26 GMT 2002 murray@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC Timecounter "i8254" frequency 1193182 Hz CPU: Pentium III/Pentium III Xeon/Celeron (798.69-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x68a Stepping = 10 Features=0x387fbff real memory = 536805376 (524224K bytes) avail memory = 517382144 (505256K bytes) Preloaded elf kernel "kernel" at 0xc04d0000. Pentium Pro MTRR support enabled md0: Malloc disk Using $PIR table, 8 entries at 0xc00fdbc0 npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at 0.0 irq 12 isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port 0xa000-0xa00f at device 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 uhci0: port 0xa400-0xa41f irq 10 at device 7.2 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhub1: Texas Instruments TUSB2046 hub, class 9/0, rev 1.10/1.25, addr 2 uhub1: 4 ports with 4 removable, self powered ukbd0: ATEN 4 Port USB KVM B V1.30, rev 1.10/1.00, addr 3, iclass 3/1 kbd0 at ukbd0 ums0: ATEN 4 Port USB KVM B V1.30, rev 1.10/1.00, addr 3, iclass 3/1 ums0: 5 buttons and Z dir. uhci1: port 0xa800-0xa81f irq 10 at device 7.3 on pci0 usb1: on uhci1 usb1: USB revision 1.0 uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered pci0: (vendor=0x1106, dev=0x3057) at 7.4 pci0: (vendor=0x1102, dev=0x0002) at 10.0 irq 5 pci0: (vendor=0x1102, dev=0x7002) at 10.1 sis0: port 0xb400-0xb4ff mem 0xdf000000-0xdf000fff irq 10 at device 12.0 on pci0 sis0: Ethernet address: 00:02:e3:22:20:ba miibus0: on sis0 ukphy0: on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto sis1: port 0xb800-0xb8ff mem 0xdf001000-0xdf001fff irq 11 at device 13.0 on pci0 sis1: Ethernet address: 00:02:e3:22:20:c4 miibus1: on sis1 ukphy1: on miibus1 ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto atapci1: port 0xcc00-0xccff,0xc800-0xc803,0xc400-0xc407,0xc000-0xc003,0xbc00-0xbc07 irq 11 at device 14.0 on pci0 ata2: at 0xbc00 on atapci1 ata3: at 0xc400 on atapci1 orm0: