From owner-freebsd-current Fri Mar 30 22:24:48 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 9531A37B720; Fri, 30 Mar 2001 22:24:42 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id QAA09533; Sat, 31 Mar 2001 16:24:38 +1000 Date: Sat, 31 Mar 2001 16:23:40 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: John Baldwin Cc: "David O'Brien" , current@FreeBSD.ORG, Mark Murray Subject: Re: i586 FP optimizations hosed. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 30 Mar 2001, John Baldwin wrote: > On 30-Mar-01 David O'Brien wrote: > > On Fri, Mar 30, 2001 at 07:45:43AM +0200, Mark Murray wrote: > >> I thought the 586 FP stuff was disabled? > > > > Nope. Depending on how current you are, it was either left broken. > > I commited BDE's fix to exeception.s that fixed things for K6-2 users. > > It looks like it is just broken in the SMP case. It is more just broken than before in the SMP case. Premptive context switching in the kernel did most of the breaking, and recent changes added sanity checks that detected a very broken case. With preemptive context switching, the following can happen: - we start using the FPU on a CPU with a free FPU (we used to free the FPU in some cases; now we only use optimizations in bcopy/bzero if the FPU was free to begin with). - we do a preemptive context switch and come back using a different FPU. The different CPU might even be unfree, and that case is now detected. In other cases, we just corrupt data by using different FPU registers :-(. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message