From owner-freebsd-arch Sun Jan 27 16:26:42 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 3462137B400 for ; Sun, 27 Jan 2002 16:26:36 -0800 (PST) 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 LAA00807; Mon, 28 Jan 2002 11:25:50 +1100 Date: Mon, 28 Jan 2002 11:27:44 +1100 (EST) From: Bruce Evans X-X-Sender: To: Terry Lambert Cc: Nate Williams , Daniel Eischen , Dan Eischen , k Macy , Peter Wemm , Julian Elischer , Subject: Re: KSE question In-Reply-To: <3C51EC04.D99E8491@mindspring.com> Message-ID: <20020128111527.N40006-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 25 Jan 2002, Terry Lambert wrote: > The worst case scenario is: > > 1) Multithreaded program on SMP system > 2) FPU thread runs on CPU #1 and causes, but does not > reap exception > 3) Non-FPU thread runs on CPU #1 > 4) Original FPU thread resumes running on CPU #2; no > exception is correctly signalled Actually: 4) Original FPU thread resumes running on CPU #2; exception is correctly signalled (i.e., not yet). at least for non-broken i386's. For broken i386's (ones with a separate FPU or ones with a backwards bug-for-bug-compatibility mode enabled): 3a) Saving state for FPU thread causes bogus exception in the context of the non-FPU thread (actually in the context switcher if the context switcher waits a bit); context switcher knows that it is bogus and ignores it. 4a) Restoring state for FPU thread causes bogus exception in the context of the FPU thread (actually in the context switcher); context switcher knows that it is bogus but (as far as I can see) can't signal it correctly (i.e., not yet). > If there's a flaw in my reasoning, I'd be happy to have it > pointed out to me... The unreaped exception is part of the FPU state (at least on i386's). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message