From owner-freebsd-ia64 Sat Nov 16 3: 1:49 2002 Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0489B37B401 for ; Sat, 16 Nov 2002 03:01:43 -0800 (PST) Received: from herring.nlsystems.com (mailgate.nlsystems.com [62.49.251.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4553943E4A for ; Sat, 16 Nov 2002 03:01:42 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring [10.0.0.2]) by herring.nlsystems.com (8.12.6/8.12.6) with ESMTP id gAGB1cDP006426; Sat, 16 Nov 2002 11:01:38 GMT (envelope-from dfr@nlsystems.com) Content-Type: text/plain; charset="iso-8859-1" From: Doug Rabson To: Marcel Moolenaar Subject: Re: setjmp/longjmp and libc_r [was: Re: cvs commit: src/lib/libc/ia64/gen _setjmp.S] Date: Sat, 16 Nov 2002 11:01:38 +0000 User-Agent: KMail/1.4.3 Cc: ia64@FreeBSD.ORG References: <200211140640.gAE6eNq9016231@repoman.freebsd.org> <200211151955.19145.dfr@nlsystems.com> <20021115130540.A34636@kayak.xcllnt.net> In-Reply-To: <20021115130540.A34636@kayak.xcllnt.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211161101.38075.dfr@nlsystems.com> X-Spam-Status: No, hits=-8.4 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02, USER_AGENT,USER_AGENT_KMAIL version=2.41 Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Friday 15 November 2002 9:05 pm, Marcel Moolenaar wrote: > On Fri, Nov 15, 2002 at 07:55:19PM +0000, Doug Rabson wrote: > > This also allows the possibility of saving/restoring the high > > floating point state in user-mode instead of kernel mode which > > might be a good thing in some situations. > > I have to think about this angle. I've been thinking about the high > FPs in the context of SMP. The goal being to avoid saving the high FP > in cpu_switch altogether and deal with processes moving to a > different CPU in a lazy way. The same principle as avoiding the > flushrs in setjmp... I thought that we already did this - we defer switching the FP state=20 until the thread takes a VEC_DISABLED_FP trap.=20 > > > > Thus: I want people to sign-up for a libc_r that uses *context > > > before 5.0-RELEASE, but preferrably tomorrow. A well-intended > > > timeline would be very nice... > > > > I want to see a libc_r which uses *context too. Its trivial to > > write thread switching this way and they are designed for it (i.e. > > no more MD grovelling around in the jmp_buf to setup the stack > > etc). I've been using makecontext/switchcontext in my own code and > > it works very well. Changing libc_r to switch this way should be > > easy if Dan hasn't already done it. > > Ok. I guess this is the best I can get. I'll work on it this weekend. > I'll restore the previous behaviour of setjmp/longjmp while I'm at > it. Thanks. Sorry if I've come over a bit dogmatic on the subject but I do=20 think that using longjmp to switch stacks is dubious on any=20 architecture and specially for ia64. At least switchcontext is designed=20 for the job :-). --=20 Doug Rabson=09=09=09=09Mail: dfr@nlsystems.com =09=09=09=09=09Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message