From owner-freebsd-current Mon Apr 2 10:37:34 2001 Delivered-To: freebsd-current@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id B188C37B71A; Mon, 2 Apr 2001 10:37:31 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f32HavG69403; Mon, 2 Apr 2001 10:36:57 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Mon, 02 Apr 2001 10:36:29 -0800 (PDT) From: John Baldwin To: Bruce Evans Subject: Re: i586 FP optimizations hosed. Cc: Mark Murray , current@FreeBSD.org, "David O'Brien" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 31-Mar-01 Bruce Evans wrote: > 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 :-(. Ugh. Hrm, then we need to either disable interrupts inside of i586_* or set a hard affinity flag in the process such that all other CPU's will ignore it and only p_lastcpu will run it next. > Bruce -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message