From owner-freebsd-arch Fri Jan 11 14:41:18 2002 Delivered-To: freebsd-arch@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id 9219837B47A for ; Fri, 11 Jan 2002 14:40:57 -0800 (PST) Received: from caddis.yogotech.com (caddis.yogotech.com [206.127.123.130]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id PAA04569; Fri, 11 Jan 2002 15:40:53 -0700 (MST) (envelope-from nate@yogotech.com) Received: (from nate@localhost) by caddis.yogotech.com (8.11.6/8.11.6) id g0BMenv14132; Fri, 11 Jan 2002 15:40:49 -0700 (MST) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15423.27120.926839.725176@caddis.yogotech.com> Date: Fri, 11 Jan 2002 15:40:48 -0700 To: Bakul Shah Cc: Dan Eischen , arch@FreeBSD.ORG Subject: Re: Request for review: getcontext, setcontext, etc In-Reply-To: <200201112141.QAA25529@devonshire.cnchost.com> References: <3C37E559.B011DF29@vigrid.com> <200201112141.QAA25529@devonshire.cnchost.com> X-Mailer: VM 6.96 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) 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 > I quick-scanned this discussion thread and got a bit > confused, so please allow me to approach it in my own way:-) > > I have a simulation thread library which allows a thread > context switch with 12 or so instructions on a x86. Does it do a full context switch, or a partial context switch? :) > As > an example, a getcontext() done from regular C code can be > "lean" and only save a few registers. The point is that this may not be a valid assumption w/regard to the FPU state. The necessity of saving/restoring the FPU state *IS* the primary subject of the the entire discussion, with the secondary part being that x86 hardware is broken, so it may not be possible to guarantee delivery of FPU exceptions to the same context that caused it. > I am not prepared to speculate on the use of FP & SSE > registers at this point except for one thing: an FP exception > *must* be delivered to whichever thread caused it. Any bugs > in SIGFPE delivery is a separate discussion! That *IS* the crux of the entire discussion. Everything else is agreed upon. No-one is arguing the point of what *should* be done, but whether or not it *can* be done. If it *can* be done (the jury is still out), then *how* is it done. Once we get past that point, we can attempt to optimize the path so that context switches can be 'lean' or 'fat' as necessary (w/regards to the FPU state). Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message