From owner-freebsd-smp@FreeBSD.ORG Wed May 9 10:25:03 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 730DC16A403 for ; Wed, 9 May 2007 10:25:03 +0000 (UTC) (envelope-from chrcoluk@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id EEC2813C4AE for ; Wed, 9 May 2007 10:25:02 +0000 (UTC) (envelope-from chrcoluk@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so252826ugh for ; Wed, 09 May 2007 03:25:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mkJYYjHpab83JR7ubys36zVOTKZRn2CI07ER7OW44d7FPP2qeiwsp5N4ewb5wZ/R791vb4S5tfP20dNTr3q6X3NJULnGCbrMCw37AcVQ54u8XeC/XQs2km7LqxmS5Ohr7c9bZG7C2s7cBXo3hQoI5f+k6WFQ2SoKRCQ1I1mPiEc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BxuOJ3iwo31vyN/6NRjSmb5Z2pAIVQAVPCyQnUjuk/GOdgwRFY3nfNkq49gSetlUoDmaMwImVH/uTRz+Qu5d8fTeI0ofOezo6g4Zp6Kz6DxiRlbIALoZ2EovZ9XnubbnG4uekkeyrfEs784plASsnuVJ0xNy1FpEdzcdQdnbEVM= Received: by 10.67.88.17 with SMTP id q17mr1163580ugl.1178706301613; Wed, 09 May 2007 03:25:01 -0700 (PDT) Received: by 10.66.242.1 with HTTP; Wed, 9 May 2007 03:25:01 -0700 (PDT) Message-ID: <3aaaa3a0705090325g3590e878kc7e67c6562e21ad8@mail.gmail.com> Date: Wed, 9 May 2007 11:25:01 +0100 From: Chris To: "Kris Kennaway" In-Reply-To: <20070505160221.GC57955@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070423153334.GA530@xor.obsecurity.org> <20070423154745.GA872@xor.obsecurity.org> <20070423155500.413CB3A5@fep9.cogeco.net> <20070423155922.GA1156@xor.obsecurity.org> <20070424010422.9E9376A4@fep3.cogeco.net> <20070424021553.GA4224@xor.obsecurity.org> <20070424025031.F0841AE5@fep1.cogeco.net> <20070424035249.GA5598@xor.obsecurity.org> <3aaaa3a0705050423x72b78952wfd530a492c9cea14@mail.gmail.com> <20070505160221.GC57955@xor.obsecurity.org> Cc: Paul , freebsd-smp@freebsd.org Subject: Re: System Cpu Between 50-70% and need to find out why X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2007 10:25:03 -0000 On 05/05/07, Kris Kennaway wrote: > On Sat, May 05, 2007 at 12:23:12PM +0100, Chris wrote: > > On 24/04/07, Kris Kennaway wrote: > > >On Mon, Apr 23, 2007 at 10:50:47PM -0400, Paul wrote: > > >> > > >> >It was almost certainly what I said above. Too bad you weren't able > > >> >to follow through with it. > > >> > > > >> >Kris > > >> > > >> Hi Kris, > > >> > > >> I was running the make depend for over 1 hour and it showed no end in > > >> sight. I figured to run that to the finish and the full make it might > > >> have taken all day so I really had no choice :) > > > > > >Odd, I suspect you were doing more than just building a kernel, which > > >only takes a few minutes to build completely (even on a quota-enabled > > >machine ;) > > > > > >> I will test this and see if it fixes the problem and confirm if this > > >> is the culprit (or not). > > >> > > >> I am surprised to hear this is all a function of the Quota problem > > >> you mention. I suppose nobody is using this anymore or is there a > > >> better system being used? > > > > > >It's just a left-over from the post-4.x SMP rewrite that didn't get > > >addressed until recently. In the grand scheme of things quotas are > > >relatively infrequently used, so it was a higher priority for the > > >developers to work on other things first. As I mentioned, fixing this > > >performance problem with quotas has now been completed in 7.0 and it > > >will probably make it back into 6.x before 6.3. > > > > > >Kris > > > > > > > > > > Hi Kris please address this ASAP in 6.x, QUOTA is used quite often in > > server environments probably more so then you believe. Considering > > 6.x is pushed as a stable version of FreeBSD and 4.x was killed off > > its dissapointing QUOTA was knowingly broken and left unpatched. > > Have you tested the 6.x patch? It's easy to criticize the developers > but harder to actually step up and help with the process yourself. > > Kris > > Where is the 6.x patch? thanks Chris From owner-freebsd-smp@FreeBSD.ORG Wed May 9 18:51:32 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BAC616A404 for ; Wed, 9 May 2007 18:51:32 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 757BC13C45D for ; Wed, 9 May 2007 18:51:32 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 5FB331A3C19; Wed, 9 May 2007 11:52:15 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id B153751450; Wed, 9 May 2007 14:51:31 -0400 (EDT) Date: Wed, 9 May 2007 14:51:31 -0400 From: Kris Kennaway To: Chris Message-ID: <20070509185131.GA50194@xor.obsecurity.org> References: <20070423154745.GA872@xor.obsecurity.org> <20070423155500.413CB3A5@fep9.cogeco.net> <20070423155922.GA1156@xor.obsecurity.org> <20070424010422.9E9376A4@fep3.cogeco.net> <20070424021553.GA4224@xor.obsecurity.org> <20070424025031.F0841AE5@fep1.cogeco.net> <20070424035249.GA5598@xor.obsecurity.org> <3aaaa3a0705050423x72b78952wfd530a492c9cea14@mail.gmail.com> <20070505160221.GC57955@xor.obsecurity.org> <3aaaa3a0705090325g3590e878kc7e67c6562e21ad8@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3aaaa3a0705090325g3590e878kc7e67c6562e21ad8@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Cc: Paul , freebsd-smp@freebsd.org, Kris Kennaway Subject: Re: System Cpu Between 50-70% and need to find out why X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2007 18:51:32 -0000 On Wed, May 09, 2007 at 11:25:01AM +0100, Chris wrote: > On 05/05/07, Kris Kennaway wrote: > >On Sat, May 05, 2007 at 12:23:12PM +0100, Chris wrote: > >> On 24/04/07, Kris Kennaway wrote: > >> >On Mon, Apr 23, 2007 at 10:50:47PM -0400, Paul wrote: > >> >> > >> >> >It was almost certainly what I said above. Too bad you weren't able > >> >> >to follow through with it. > >> >> > > >> >> >Kris > >> >> > >> >> Hi Kris, > >> >> > >> >> I was running the make depend for over 1 hour and it showed no end in > >> >> sight. I figured to run that to the finish and the full make it might > >> >> have taken all day so I really had no choice :) > >> > > >> >Odd, I suspect you were doing more than just building a kernel, which > >> >only takes a few minutes to build completely (even on a quota-enabled > >> >machine ;) > >> > > >> >> I will test this and see if it fixes the problem and confirm if this > >> >> is the culprit (or not). > >> >> > >> >> I am surprised to hear this is all a function of the Quota problem > >> >> you mention. I suppose nobody is using this anymore or is there a > >> >> better system being used? > >> > > >> >It's just a left-over from the post-4.x SMP rewrite that didn't get > >> >addressed until recently. In the grand scheme of things quotas are > >> >relatively infrequently used, so it was a higher priority for the > >> >developers to work on other things first. As I mentioned, fixing this > >> >performance problem with quotas has now been completed in 7.0 and it > >> >will probably make it back into 6.x before 6.3. > >> > > >> >Kris > >> > > >> > > >> > >> Hi Kris please address this ASAP in 6.x, QUOTA is used quite often in > >> server environments probably more so then you believe. Considering > >> 6.x is pushed as a stable version of FreeBSD and 4.x was killed off > >> its dissapointing QUOTA was knowingly broken and left unpatched. > > > >Have you tested the 6.x patch? It's easy to criticize the developers > >but harder to actually step up and help with the process yourself. > > > >Kris > > > > > Where is the 6.x patch? I believe kib@ has posted about it before, please check the archives. Kris From owner-freebsd-smp@FreeBSD.ORG Thu May 10 21:24:50 2007 Return-Path: X-Original-To: smp@freebsd.org Delivered-To: freebsd-smp@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E69316A405 for ; Thu, 10 May 2007 21:24:50 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outF.internet-mail-service.net (outF.internet-mail-service.net [216.240.47.229]) by mx1.freebsd.org (Postfix) with ESMTP id ED7E713C44B for ; Thu, 10 May 2007 21:24:49 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Thu, 10 May 2007 14:11:18 -0700 Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id EB0AE125A29 for ; Thu, 10 May 2007 14:11:17 -0700 (PDT) Message-ID: <46438A75.7050801@elischer.org> Date: Thu, 10 May 2007 14:11:17 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: smp@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: starting up new conversation X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2007 21:24:50 -0000 ok just a first message of a new bunch.. We'll be discussing SMP scalability. From owner-freebsd-smp@FreeBSD.ORG Thu May 10 21:29:50 2007 Return-Path: X-Original-To: smp@freebsd.org Delivered-To: freebsd-smp@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9289016A402 for ; Thu, 10 May 2007 21:29:50 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outC.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id 76EEF13C46C for ; Thu, 10 May 2007 21:29:50 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Thu, 10 May 2007 14:15:45 -0700 Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id D82B8125A23; Thu, 10 May 2007 14:15:44 -0700 (PDT) Message-ID: <46438B80.6000404@elischer.org> Date: Thu, 10 May 2007 14:15:44 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: marko.kiiskila@nokia.com References: <2BC1E09BAED3A94ABF23A2B2469D1E59739C02@esebe108.NOE.Nokia.com> <4640CDFA.9090602@elischer.org> <0AC25B27A4FD2E4B839C9FAF2C704DBA012E79D4@daebe103.NOE.Nokia.com> <20070510123608.N643@10.0.0.1> In-Reply-To: <20070510123608.N643@10.0.0.1> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Attilio Rao , Jeff Roberson , jeff@FreeBSD.org, Giri.Rashiyamany@nokia.com, smp@freebsd.org Subject: Re: threadlock patch X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2007 21:29:50 -0000 Marko, We are just reorganising our effort on this stuff to put it in a bit more of an organised manner. for a start.. there is a perforce branch that covers this work.. http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=/depot/user/attilio/attilio%5fschedlock&HIDEDEL=NO (hopefully that didn't wrap) also we are using the mailing list smp@freebsd.org to discuss this. I suggest that you and any of the guys there who are intersted in pushing this sign up to catch the fun. I've CC'd this to the list.. I suggest we use that list to communicate so that there is a record. also makes is easier for others to follow and join when needed. Julian Jeff Roberson wrote: > I just returned home from a long trip so I don't have time to review > your turnstile and rwlock changes in detail. I do have a few comments > about the patch that may be helpful as well as some questions. > > The threadlock patch is really just a first starting point to get us to > per-cpu run queue locks. By itself it will only minorly reduce > contention for sched lock since in most cases the per-cpu thread lock > still points to this single scheduler lock. There is another bit of > work that must be done in ULE to permit the use of per-cpu locks. I do > not believe it is practical to do this on 4BSD. Once this is done we > should see some impressive performance improvements on larger machines, > especially with context-switch heavy workloads. > > I would like to ask what your environment is. How many cpus do you have > per machine and what kind of workload are they running? What problems > are you running into that lead you to this patch? I do not know in what > capacity nokia uses FreeBSD. I'm very interested in finishing up this > work and having a good test case and industry involvement would help > that along. > > Thanks, > Jeff From owner-freebsd-smp@FreeBSD.ORG Thu May 10 21:44:49 2007 Return-Path: X-Original-To: smp@freebsd.org Delivered-To: freebsd-smp@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0BA916A403 for ; Thu, 10 May 2007 21:44:49 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from outL.internet-mail-service.net (outL.internet-mail-service.net [216.240.47.235]) by mx1.freebsd.org (Postfix) with ESMTP id 8BF2213C457 for ; Thu, 10 May 2007 21:44:49 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Thu, 10 May 2007 14:30:27 -0700 Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 76881125B45 for ; Thu, 10 May 2007 14:30:27 -0700 (PDT) Message-ID: <46438EF2.80200@freebsd.org> Date: Thu, 10 May 2007 14:30:26 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: smp@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: test X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2007 21:44:49 -0000 may mails have been failing.. testing From owner-freebsd-smp@FreeBSD.ORG Fri May 11 00:20:47 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3548816A404 for ; Fri, 11 May 2007 00:20:47 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id 9442813C44C for ; Fri, 11 May 2007 00:20:46 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id E130069092E for ; Fri, 11 May 2007 01:03:57 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id 9DAE869097F; Fri, 11 May 2007 01:03:57 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,RCVD_IN_SORBS_DUL autolearn=no version=3.1.7 Received: from epsilon.local.fnop.net (87-196-119-163.net.novis.pt [87.196.119.163]) by core.fnop.net (Postfix) with ESMTP id 2837969092E for ; Fri, 11 May 2007 01:03:57 +0100 (WEST) Date: Fri, 11 May 2007 01:03:58 +0100 Message-ID: <86sla45iq9.wl%rpaulo@fnop.net> From: Rui Paulo To: freebsd-smp@freebsd.org User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV using ClamSMTP Subject: Fixing SMP on MacBooks X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 00:20:47 -0000 Hi, I would like to bring this discussion to a wider audicence. So, here's the problem: As some of you already know, the second core on Apple's MacBooks fails to start. There are two nasty tricks to make it start (both involve interactivity from the user) that I know of. They are: 1) Press the power button during the IPI timeout; 2) Press a key [1] before the IPIs are sent *OR* during the IPI timeout. [1] This is really an interrupt. Pressing the Fn key doesn't work because the Fn key doesn't generate an interrupt. There tricks don't work on the MacBook Pro. While the source of the problem might be the same, it's not clear why the tricks work. Some ideas (came up during discussion with Scott Long) 1) Update EFI -- I have the latest updates from Apple and the AP doesn't start. 2) The trampoline isn't being set correctly -- if that was the case, the tricks wouldn't really work 3) Check what kind of interrupt is generated by the USB controller 4) The LAPIC is not being set correctly -- I've been reading the Linux code on this matter and I don't see any relevant difference 5) The boot loader is doing something legacy only [2] [2] This was true for cdboot, at least. Either way, an interrupt is (it seems): 1) triggering a (re)configuration of something; or 2) enabling another interrupt(s) Anyone has any other ideas on how to better debug this ? Thanks in advance. From owner-freebsd-smp@FreeBSD.ORG Fri May 11 00:20:47 2007 Return-Path: X-Original-To: smp@FreeBSD.org Delivered-To: freebsd-smp@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35FB916A405 for ; Fri, 11 May 2007 00:20:47 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id A016813C457 for ; Fri, 11 May 2007 00:20:46 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id 8AA8A68FEBB for ; Fri, 11 May 2007 00:47:46 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id 31A51690924; Fri, 11 May 2007 00:47:46 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,RCVD_IN_SORBS_DUL autolearn=no version=3.1.7 Received: from epsilon.local.fnop.net (87-196-119-163.net.novis.pt [87.196.119.163]) by core.fnop.net (Postfix) with ESMTP id 8AC8F68FEBB for ; Fri, 11 May 2007 00:47:45 +0100 (WEST) Date: Fri, 11 May 2007 00:47:44 +0100 Message-ID: <86y7jw5jhb.wl%rpaulo@fnop.net> From: Rui Paulo To: smp@FreeBSD.org User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV using ClamSMTP Cc: Subject: Fixing SMP on MacBooks X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 00:20:47 -0000 Hi, I would like to bring this discussion to a wider audicence. So, here's the problem: As some of you already know, the second core on Apple's MacBooks fails to start. There are two nasty tricks to make it start (both involve interactivity from the user) that I know of. They are: 1) Press the power button during the IPI timeout; 2) Press a key [1] before the IPIs are sent *OR* during the IPI timeout. [1] This is really an interrupt. Pressing the Fn key doesn't work because the Fn key doesn't generate an interrupt. There tricks don't work on the MacBook Pro. While the source of the problem might be the same, it's not clear why the tricks work. Some ideas (came up during discussion with Scott Long) 1) Update EFI -- I have the latest updates from Apple and the AP doesn't start. 2) The trampoline isn't being set correctly -- if that was the case, the tricks wouldn't really work 3) Check what kind of interrupt is generated by the USB controller 4) The LAPIC is not being set correctly -- I've been reading the Linux code on this matter and I don't see any relevant difference 5) The boot loader is doing something legacy only [2] [2] This was true for cdboot, at least. Either way, an interrupt is (it seems): 1) triggering a (re)configuration of something; or 2) enabling another interrupt(s) Anyone has any other ideas on how to better debug this ? From owner-freebsd-smp@FreeBSD.ORG Fri May 11 00:23:37 2007 Return-Path: X-Original-To: smp@FreeBSD.org Delivered-To: freebsd-smp@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF49516A402 for ; Fri, 11 May 2007 00:23:37 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id 89B7C13C459 for ; Fri, 11 May 2007 00:23:37 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id 384D468FEBB for ; Fri, 11 May 2007 01:23:34 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id E68EC690924; Fri, 11 May 2007 01:23:33 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,RCVD_IN_SORBS_DUL autolearn=no version=3.1.7 Received: from epsilon.local.fnop.net (87-196-119-163.net.novis.pt [87.196.119.163]) by core.fnop.net (Postfix) with ESMTP id 58C3B68FEBB for ; Fri, 11 May 2007 01:23:33 +0100 (WEST) Date: Fri, 11 May 2007 01:23:34 +0100 Message-ID: <86ps585htl.wl%rpaulo@fnop.net> From: Rui Paulo To: smp@FreeBSD.org In-Reply-To: <86y7jw5jhb.wl%rpaulo@fnop.net> References: <86y7jw5jhb.wl%rpaulo@fnop.net> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV using ClamSMTP Cc: Subject: Re: Fixing SMP on MacBooks X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 00:23:37 -0000 Please disregard this one. From owner-freebsd-smp@FreeBSD.ORG Fri May 11 10:46:52 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9643F16A406 for ; Fri, 11 May 2007 10:46:52 +0000 (UTC) (envelope-from flo@kasimir.com) Received: from config.solomo.org (kasimir.com [85.214.51.166]) by mx1.freebsd.org (Postfix) with ESMTP id F2E3613C459 for ; Fri, 11 May 2007 10:46:51 +0000 (UTC) (envelope-from flo@kasimir.com) Received: (qmail 46768 invoked from network); 11 May 2007 12:20:10 +0200 Received: from relay3.vistream.de (HELO nibbler.vistream.local) (87.139.10.28) by solomo.org with SMTP; 11 May 2007 12:20:10 +0200 Message-ID: <46444339.6030707@kasimir.com> Date: Fri, 11 May 2007 12:19:37 +0200 From: "Florian C. Smeets" User-Agent: Thunderbird 2.0.0.4pre (Macintosh/20070510) MIME-Version: 1.0 To: Rui Paulo References: <86sla45iq9.wl%rpaulo@fnop.net> In-Reply-To: <86sla45iq9.wl%rpaulo@fnop.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-smp@freebsd.org Subject: Re: Fixing SMP on MacBooks X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 10:46:52 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Rui Paulo wrote: > Hi, Hi! > I would like to bring this discussion to a wider audicence. > > So, here's the problem: > As some of you already know, the second core on Apple's MacBooks fails > to start. There are two nasty tricks to make it start (both involve > interactivity from the user) that I know of. > > They are: > 1) Press the power button during the IPI timeout; > 2) Press a key [1] before the IPIs are sent *OR* during the > IPI timeout. > > [1] This is really an interrupt. Pressing the Fn key doesn't work > because the Fn key doesn't generate an interrupt. > > There tricks don't work on the MacBook Pro. While the source of the > problem might be the same, it's not clear why the tricks work. > Well i was able to boot a 7-CURRENT snapshot from February or March on a first rev. MBP and it did recognize the second core when pressing the power button right after this line: ACPI APIC Table: This used to work reliably. Thanks for working on the MacBook support for FreeBSD! I will be setting up a partition for FreeBSD again this weekend. So if you have anything to test you can count me in :-) Cheers Florian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFGREM5A+1tjUZ1YScRCmq3AJ46Uzuc+DDbsxSJQXto2FH9mj+i/wCfVNfh C7YvrN0UkibKHyAjaPNPQ+I= =Ezah -----END PGP SIGNATURE----- From owner-freebsd-smp@FreeBSD.ORG Fri May 11 10:55:42 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13A7D16A406 for ; Fri, 11 May 2007 10:55:42 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id 8094013C469 for ; Fri, 11 May 2007 10:55:41 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id 10BAE69092C; Fri, 11 May 2007 11:55:36 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id C446A69099D; Fri, 11 May 2007 11:55:35 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=AWL, BAYES_00, FORGED_RCVD_HELO, RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL autolearn=no version=3.1.7 Received: from epsilon.local.fnop.net (87-196-155-78.net.novis.pt [87.196.155.78]) by core.fnop.net (Postfix) with ESMTP id 58BCD69092C; Fri, 11 May 2007 11:55:35 +0100 (WEST) Date: Fri, 11 May 2007 11:55:38 +0100 Message-ID: <86ps57pr2t.wl%rpaulo@fnop.net> From: Rui Paulo To: "Florian C. Smeets" In-Reply-To: <46444339.6030707@kasimir.com> References: <86sla45iq9.wl%rpaulo@fnop.net> <46444339.6030707@kasimir.com> User-Agent: Wanderlust/2.15.5 (Almost Unreal) Emacs/21.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-smp@freebsd.org Subject: Re: Fixing SMP on MacBooks X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 10:55:42 -0000 At Fri, 11 May 2007 12:19:37 +0200, Florian C. Smeets wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Rui Paulo wrote: > > Hi, > > Hi! > > > I would like to bring this discussion to a wider audicence. > > > > So, here's the problem: > > As some of you already know, the second core on Apple's MacBooks fails > > to start. There are two nasty tricks to make it start (both involve > > interactivity from the user) that I know of. > > > > They are: > > 1) Press the power button during the IPI timeout; > > 2) Press a key [1] before the IPIs are sent *OR* during the > > IPI timeout. > > > > [1] This is really an interrupt. Pressing the Fn key doesn't work > > because the Fn key doesn't generate an interrupt. > > > > There tricks don't work on the MacBook Pro. While the source of the > > problem might be the same, it's not clear why the tricks work. > > > > Well i was able to boot a 7-CURRENT snapshot from February or March on a > first rev. MBP and it did recognize the second core when pressing the > power button right after this line: > > ACPI APIC Table: > > This used to work reliably. Have you tried pressing a key? I also have a first rev MBP and it works. > Thanks for working on the MacBook support for FreeBSD! I will be setting > up a partition for FreeBSD again this weekend. So if you have anything > to test you can count me in :-) No problem. I have drivers for the backlight and the CPU temperature if you want to test. I also have a fix for CPU frequency scaling. -- Rui Paulo From owner-freebsd-smp@FreeBSD.ORG Fri May 11 10:57:32 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 618D316A405 for ; Fri, 11 May 2007 10:57:32 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id CAC8113C459 for ; Fri, 11 May 2007 10:57:31 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id 628F569099D; Fri, 11 May 2007 11:57:26 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id 305416909A8; Fri, 11 May 2007 11:57:26 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=AWL, BAYES_00, FORGED_RCVD_HELO, RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL autolearn=no version=3.1.7 Received: from epsilon.local.fnop.net (87-196-155-78.net.novis.pt [87.196.155.78]) by core.fnop.net (Postfix) with ESMTP id C319769099D; Fri, 11 May 2007 11:57:25 +0100 (WEST) Date: Fri, 11 May 2007 11:57:29 +0100 Message-ID: <86odkrpqzq.wl%rpaulo@fnop.net> From: Rui Paulo To: "Florian C. Smeets" In-Reply-To: <86ps57pr2t.wl%rpaulo@fnop.net> References: <86sla45iq9.wl%rpaulo@fnop.net> <46444339.6030707@kasimir.com> <86ps57pr2t.wl%rpaulo@fnop.net> User-Agent: Wanderlust/2.15.5 (Almost Unreal) Emacs/21.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-smp@freebsd.org Subject: Re: Fixing SMP on MacBooks X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 10:57:32 -0000 At Fri, 11 May 2007 11:55:38 +0100, Rui Paulo wrote: > > At Fri, 11 May 2007 12:19:37 +0200, > Florian C. Smeets wrote: > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA512 > > > > Rui Paulo wrote: > > > Hi, > > > > Hi! > > > > > I would like to bring this discussion to a wider audicence. > > > > > > So, here's the problem: > > > As some of you already know, the second core on Apple's MacBooks fails > > > to start. There are two nasty tricks to make it start (both involve > > > interactivity from the user) that I know of. > > > > > > They are: > > > 1) Press the power button during the IPI timeout; > > > 2) Press a key [1] before the IPIs are sent *OR* during the > > > IPI timeout. > > > > > > [1] This is really an interrupt. Pressing the Fn key doesn't work > > > because the Fn key doesn't generate an interrupt. > > > > > > There tricks don't work on the MacBook Pro. While the source of the > > > problem might be the same, it's not clear why the tricks work. > > > > > > > Well i was able to boot a 7-CURRENT snapshot from February or March on a > > first rev. MBP and it did recognize the second core when pressing the > > power button right after this line: > > > > ACPI APIC Table: > > > > This used to work reliably. > > Have you tried pressing a key? > I also have a first rev MBP and it works. Oops, sorry, I don't have a MackBook Pro. I have a MacBook. Do you really have a MacBook Pro? AFAIK that trick never worked on the Pro version. -- Rui Paulo From owner-freebsd-smp@FreeBSD.ORG Fri May 11 11:09:40 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EAF1C16A408 for ; Fri, 11 May 2007 11:09:40 +0000 (UTC) (envelope-from flo@kasimir.com) Received: from config.solomo.org (kasimir.com [85.214.51.166]) by mx1.freebsd.org (Postfix) with ESMTP id 5239513C48C for ; Fri, 11 May 2007 11:09:40 +0000 (UTC) (envelope-from flo@kasimir.com) Received: (qmail 47491 invoked from network); 11 May 2007 13:09:38 +0200 Received: from relay3.vistream.de (HELO nibbler.vistream.local) (87.139.10.28) by fahrschule-gaidies.de with SMTP; 11 May 2007 13:09:38 +0200 Message-ID: <46444ED2.6070107@kasimir.com> Date: Fri, 11 May 2007 13:09:06 +0200 From: "Florian C. Smeets" User-Agent: Thunderbird 2.0.0.4pre (Macintosh/20070510) MIME-Version: 1.0 To: Rui Paulo References: <86sla45iq9.wl%rpaulo@fnop.net> <46444339.6030707@kasimir.com> <86ps57pr2t.wl%rpaulo@fnop.net> <86odkrpqzq.wl%rpaulo@fnop.net> In-Reply-To: <86odkrpqzq.wl%rpaulo@fnop.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-smp@freebsd.org Subject: Re: Fixing SMP on MacBooks X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 11:09:41 -0000 Rui Paulo wrote: > At Fri, 11 May 2007 11:55:38 +0100, > Rui Paulo wrote: >> At Fri, 11 May 2007 12:19:37 +0200, >> Florian C. Smeets wrote: >>> Rui Paulo wrote: >>>> >>>> There tricks don't work on the MacBook Pro. While the source of the >>>> problem might be the same, it's not clear why the tricks work. >>>> >>> Well i was able to boot a 7-CURRENT snapshot from February or March on a >>> first rev. MBP and it did recognize the second core when pressing the >>> power button right after this line: >>> >>> ACPI APIC Table: >>> >>> This used to work reliably. >> Have you tried pressing a key? >> I also have a first rev MBP and it works. > > Oops, sorry, I don't have a MackBook Pro. I have a MacBook. > Do you really have a MacBook Pro? AFAIK that trick never worked on the > Pro version. Yes, i have a MacBook Pro and it worked like i described. That's why i replied to your mail in the first place :-) As is said I'm going to setup FreeBSD on my MBP over the weekend and will give your patches a try. Florian From owner-freebsd-smp@FreeBSD.ORG Fri May 11 11:34:16 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C55AE16A403 for ; Fri, 11 May 2007 11:34:16 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id 4103613C458 for ; Fri, 11 May 2007 11:34:16 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id 3A50169092C; Fri, 11 May 2007 12:34:10 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id EECD669099D; Fri, 11 May 2007 12:34:09 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=AWL, BAYES_00, FORGED_RCVD_HELO, RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL autolearn=no version=3.1.7 Received: from epsilon.local.fnop.net (87-196-155-78.net.novis.pt [87.196.155.78]) by core.fnop.net (Postfix) with ESMTP id 899C769092C; Fri, 11 May 2007 12:34:09 +0100 (WEST) Date: Fri, 11 May 2007 12:34:13 +0100 Message-ID: <86mz0bppai.wl%rpaulo@fnop.net> From: Rui Paulo To: "Florian C. Smeets" In-Reply-To: <46444ED2.6070107@kasimir.com> References: <86sla45iq9.wl%rpaulo@fnop.net> <46444339.6030707@kasimir.com> <86ps57pr2t.wl%rpaulo@fnop.net> <86odkrpqzq.wl%rpaulo@fnop.net> <46444ED2.6070107@kasimir.com> User-Agent: Wanderlust/2.15.5 (Almost Unreal) Emacs/21.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-smp@freebsd.org Subject: Re: Fixing SMP on MacBooks X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 11:34:16 -0000 At Fri, 11 May 2007 13:09:06 +0200, Florian C. Smeets wrote: > > Rui Paulo wrote: > > At Fri, 11 May 2007 11:55:38 +0100, > > Rui Paulo wrote: > >> At Fri, 11 May 2007 12:19:37 +0200, > >> Florian C. Smeets wrote: > >>> Rui Paulo wrote: > >>>> > >>>> There tricks don't work on the MacBook Pro. While the source of the > >>>> problem might be the same, it's not clear why the tricks work. > >>>> > >>> Well i was able to boot a 7-CURRENT snapshot from February or March on a > >>> first rev. MBP and it did recognize the second core when pressing the > >>> power button right after this line: > >>> > >>> ACPI APIC Table: > >>> > >>> This used to work reliably. > >> Have you tried pressing a key? > >> I also have a first rev MBP and it works. > > > > Oops, sorry, I don't have a MackBook Pro. I have a MacBook. > > Do you really have a MacBook Pro? AFAIK that trick never worked on the > > Pro version. > > Yes, i have a MacBook Pro and it worked like i described. That's why i > replied to your mail in the first place :-) As is said I'm going to > setup FreeBSD on my MBP over the weekend and will give your patches a try. Hmm. Interesting. Anyway, I'll mail my patches to -current soon. -- Rui Paulo From owner-freebsd-smp@FreeBSD.ORG Fri May 11 14:03:07 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8D7516A404 for ; Fri, 11 May 2007 14:03:07 +0000 (UTC) (envelope-from llhid@earthlink.net) Received: from elasmtp-masked.atl.sa.earthlink.net (elasmtp-masked.atl.sa.earthlink.net [209.86.89.68]) by mx1.freebsd.org (Postfix) with ESMTP id AC68913C484 for ; Fri, 11 May 2007 14:03:07 +0000 (UTC) (envelope-from llhid@earthlink.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=Ffx/9ldn2R/FACiuytmuV+ytmQ0r++wtIOYwTQEkG4Ef3bbItpItv3GVR9ffdppG; h=Received:Message-ID:Reply-To:From:To:Subject:Date:MIME-Version:Content-Type:X-Priority:X-MSMail-Priority:X-Mailer:X-MimeOLE:X-ELNK-Trace:X-Originating-IP; Received: from [4.255.242.245] (helo=Cinderella) by elasmtp-masked.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1HmVTr-0005hq-F0 for freebsd-smp@freebsd.org; Fri, 11 May 2007 09:48:24 -0400 Message-ID: <002e01c793d3$13c182a0$f5f2ff04@Cinderella> From: "Linda Higgins" To: Date: Fri, 11 May 2007 09:48:31 -0400 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-ELNK-Trace: 52ebcbdde716cba074bf435c0eb9d47811eb5c9aa44f2a66be9c592a6ae9e9ba7b5b6fcc97e9da9d350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 4.255.242.245 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Welcome to Chase Online X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Linda Higgins List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 14:03:07 -0000 I would like to view my statement. How do I do that. Linda Higgins From owner-freebsd-smp@FreeBSD.ORG Fri May 11 16:48:44 2007 Return-Path: X-Original-To: smp@freebsd.org Delivered-To: freebsd-smp@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 820E516A400 for ; Fri, 11 May 2007 16:48:44 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.224]) by mx1.freebsd.org (Postfix) with ESMTP id 2874613C455 for ; Fri, 11 May 2007 16:48:44 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so1022716wra for ; Fri, 11 May 2007 09:48:43 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=ZmsrogCsF8uVSnY2Nd1PVURXBVQlYqTXtYrR6NYA+mNDyL5817gSy1FxUqR9q5QAgVKtyIFRBWNRE9zmiVGeceN3HArCiUOiIpUTqPy6gEr+N59jlCv+qD5qcsXwZnsBB4Z4rHHaGWxXv/c9U0rB8Zb8N3NB86pWz6Kv0WmkZvU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=c9JgxgvqduauUAPtWoQx0MCFI0stwPFTbJaUklBzBvFmsrUqBG4OPx0P3DByQBSSXeOp3by8r87yTffhZwzOPdtE29Av+ZVAPSOUF4VmXeiI/JBYgu0FU63E4OkbglMEr05T9ZMbBQw0scAvZ3E9UluCdxveFnmncHDk1FdAk2w= Received: by 10.78.171.13 with SMTP id t13mr897877hue.1178900583226; Fri, 11 May 2007 09:23:03 -0700 (PDT) Received: by 10.78.120.9 with HTTP; Fri, 11 May 2007 09:23:03 -0700 (PDT) Message-ID: <3bbf2fe10705110923g2f072d58ld2d15f5eddd0684f@mail.gmail.com> Date: Fri, 11 May 2007 18:23:03 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Julian Elischer" In-Reply-To: <46438B80.6000404@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2BC1E09BAED3A94ABF23A2B2469D1E59739C02@esebe108.NOE.Nokia.com> <4640CDFA.9090602@elischer.org> <0AC25B27A4FD2E4B839C9FAF2C704DBA012E79D4@daebe103.NOE.Nokia.com> <20070510123608.N643@10.0.0.1> <46438B80.6000404@elischer.org> X-Google-Sender-Auth: be292a45815061aa Cc: smp@freebsd.org, marko.kiiskila@nokia.com, Giri.Rashiyamany@nokia.com, jeff@freebsd.org Subject: Re: threadlock patch X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 16:48:44 -0000 2007/5/10, Julian Elischer : > Marko, > We are just reorganising our effort on this stuff > to put it in a bit more of an organised manner. > > for a start.. there is a perforce branch that covers this work.. > > http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=/depot/user/attilio/attilio%5fschedlock&HIDEDEL=NO > > (hopefully that didn't wrap) > also we are using the mailing list smp@freebsd.org > to discuss this. I suggest that you and any of the guys there who are intersted in > pushing this sign up to catch the fun. I've CC'd this to the list.. > I suggest we use that list to communicate so that there is a record. > also makes is easier for others to follow and join when needed. So here we go. With this e-mail I'd like to explain the state of the sched_lock pushdown work and its implications. Start with saying that even if sched_lock has showed to be the most conteded lock in our kernel, effort for breaking it is intended to serve mainly for ULE scheduler optimizations. Having nomore a global lock, infact, will leave us splitting the current global runqueue into per-cpu/per-core runqueues optimizing a lot ULE behaviour. The approach choosen for breaking sched_lock is, IIRC, what Solaris alredy uses in its kernel: using containers lock. Basically, every "container" (as sleepqueues, runqueues, turnstile queues, etc.) has its own global lock. Every thread holds a ptr to the specific container in which is working and so thread locking results in locking the container. This allow an extremely high parallelism and a avoids a lot of pain with LORs (that could be raised by different approaches). In a perfect world this would have been enough to accomplish the task, but in this world is not; basically, sched_lock is currently used in the kernel in order to protect other things like per-proc flags, like ldt locking (in ia32), etc. In order to lock these other parts alternative approaches have been investigated. So, the work has been basically divided into two different parts: 1) sched_lock substitution in 'miscellaneous' subsystems 2) implementation of the container locks handler That perforce branch tries to address rather completely the problem n.1 while Jeff worked mainly on the problem n.2. More specifically, the branch contains: - locking for ldt in FreeBSD-ia32 - locking for global vmmeter cnt - locking for timer - locking for rusage The idea is to have the branch to be well working and well tested (and well benchmarked, as well) and possibily to commit into CVS these changes before to go on and integrate Jeff's work, since it is the most important and we want to be sure to work on a strong base. Currently, open problems are: - approach for locking rusage should be better evaluated and different approaches should be tried on either UP and SMP systems in order to get the better one - a first benchmark on Jeff's patch (using sysbench), showed an higher peak (IIRC, between 5% and 10%) on 8-CPUs machine, but the scalability got a lot worse. We have to understand why the scalability suddenly breaks down and resolve that. I hope all you have a clearer situation now, if you want to know more details just please write an e-mail :) Thaks, Attilio -- Peace can only be achieved by understanding - A. Einstein