From owner-freebsd-java Thu Nov 28 16:35:10 2002 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18BFC37B401 for ; Thu, 28 Nov 2002 16:35:09 -0800 (PST) Received: from gnuppy.monkey.org (wsip68-15-8-100.sd.sd.cox.net [68.15.8.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AB4843E9C for ; Thu, 28 Nov 2002 16:35:08 -0800 (PST) (envelope-from billh@gnuppy.monkey.org) Received: from billh by gnuppy.monkey.org with local (Exim 3.36 #1 (Debian)) id 18HZ7O-0000Wz-00; Thu, 28 Nov 2002 16:34:54 -0800 Date: Thu, 28 Nov 2002 16:34:53 -0800 To: Daniel Eischen Cc: Alexey Zelkin , freebsd-java@FreeBSD.ORG, "Bill Huey (Hui)" Subject: Re: PATCH - changing libc_r to use *context() (fwd) Message-ID: <20021129003453.GB1818@gnuppy.monkey.org> References: <20021128143403.A98438@phantom.cris.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i From: Bill Huey (Hui) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Nov 28, 2002 at 08:00:41AM -0500, Daniel Eischen wrote: > No, it shouldn't be much slower, at least for i386. Each arch > now has a MD header file which is used by the thread scheduler. > This file has to define THR_SETCONTEXT, THR_GETCONTEXT, and > THR_SWAPCONTEXT. For i386, we provide userland versions of > the *context() calls. For other archs that just want to get > up and running, they can define these to be the system calls. > And since libc_r is going away eventually, there's really > no nead for optimizing them for other archs anyways. I looked at the patch and it's exactly what we need for doing the kind of ucontext trickery we're doing now and need in the future. ;) Both native versions of J2SE are i386 only at this time, so it'll fine for folks like us, not sure what you're having to deal with at this time for other architectures. If compilation of those changes can be made architectural specific, then putting in place will be nice. That's up to you though. I'm getting the register values (esp, eip, ebp) out of the backing jmp_buf for now, which is sufficient at this time and the need for a ucontext isn't terrible urgent. I'll switch once that's all in place and then "fast path" the entire thing. > I don't see them working on -stable, since it doesn't have > *context() system calls. It could work for i386, but there > are some other problems in the kernel that may prevent it > anyways (floating point state is not aligned). > > And on -current, this patch isn't quite right. FPU state > isn't being properly restored and the kernel needs to be > fixed to align the FPU state also. I'm targetting all of my stuff for -current at this time because of the threading issues. bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message