Date: Fri, 11 Jan 2002 15:40:48 -0700 From: Nate Williams <nate@yogotech.com> To: Bakul Shah <bakul@bitblocks.com> Cc: Dan Eischen <eischen@vigrid.com>, arch@FreeBSD.ORG Subject: Re: Request for review: getcontext, setcontext, etc Message-ID: <15423.27120.926839.725176@caddis.yogotech.com> In-Reply-To: <200201112141.QAA25529@devonshire.cnchost.com> References: <3C37E559.B011DF29@vigrid.com> <200201112141.QAA25529@devonshire.cnchost.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15423.27120.926839.725176>