From owner-freebsd-sparc64@FreeBSD.ORG Thu Oct 7 17:06:44 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E2C516A4CE for ; Thu, 7 Oct 2004 17:06:44 +0000 (GMT) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 624CE43D48 for ; Thu, 7 Oct 2004 17:06:44 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 26149 invoked from network); 7 Oct 2004 17:06:44 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 7 Oct 2004 17:06:43 -0000 Received: from [10.50.40.210] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i97H6cs8081762; Thu, 7 Oct 2004 13:06:41 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-sparc64@FreeBSD.org Date: Thu, 7 Oct 2004 11:26:02 -0400 User-Agent: KMail/1.6.2 References: <20041006031406.GB26037@electra.cse.Buffalo.EDU> <20041006201849.GC21875@electra.cse.Buffalo.EDU> In-Reply-To: <20041006201849.GC21875@electra.cse.Buffalo.EDU> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410071126.02612.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Ken Smith cc: freebsd-threads@FreeBSD.org Subject: Re: Bug in kse_switchin()? X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 17:06:44 -0000 On Wednesday 06 October 2004 04:18 pm, Ken Smith wrote: > On Tue, Oct 05, 2004 at 11:14:06PM -0400, Ken Smith wrote: > > On Thu, Sep 23, 2004 at 02:20:51PM +0400, Andrew Belashov wrote: > > > Where bug? > > > - In sparc64 specific core? > > > - In kern/kern_kse.c and kern/kern_thr.c code? > > > > Can you humor me and test this patch please? > > > > Index: sys/conf/kern.pre.mk > > =================================================================== > > RCS file: /home/ncvs/src/sys/conf/kern.pre.mk,v > > retrieving revision 1.57 > > diff -u -r1.57 kern.pre.mk > > --- sys/conf/kern.pre.mk 23 Sep 2004 22:53:22 -0000 1.57 > > +++ sys/conf/kern.pre.mk 6 Oct 2004 03:09:09 -0000 > > @@ -24,7 +24,7 @@ > > . elif ${MACHINE_ARCH} == "ia64" > > COPTFLAGS?=-O2 -pipe > > . elif ${MACHINE_ARCH} == "sparc64" > > -COPTFLAGS?=-O2 -pipe > > +COPTFLAGS?=-O -pipe > > . elif ${MACHINE_ARCH} == "arm" > > COPTFLAGS?=-O2 -pipe > > . else > > > > You'll need to go through a complete kernel build cycle after applying > > it (starting with 'config'). > > FYI... > > While working on adding a KASSERT() to some other code last week I > had tripped across what appeared to be a section of code where the > addition of the KASSERT() was "position sensitive". It was in the > sparc64/sparc64/rwindow.c file, in code that's mucking around with > register windows so admittedly that's somewhat special code. But > a few people I asked including jake and jhb didn't see any obvious > reason for where the KASSERT() went being position sensitive. In > the "bad case" the result was corruption of processes, most of > what the system tried to run during boot-up died. And if I shifted > the kernel compile to use -O instead of -O2 with no other changes > at all the resulting kernel didn't have the process corruption issues. > > Between Andrew's report above and a few other things (John reports > his kernels built from custom config files instead of GENERIC fail > to run) I decided to go ahead with shifting to -O instead of -O2 > in HEAD now. Under normal circumstances I would have been more > patient and asked for more input/testing here before making that > sort of change but I want to be in a position I would be allowed > to MFC this change for RC1 if it does turn out this fixes even > just a few of the problems that seem to be floating around. If > it turns out to be a false alarm I won't MFC it. FWIW, -O didn't help me to compile a custom kernel. I get a page fault very early due to running out of UMA preallocated pages I think. I have no idea why though. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org