From owner-freebsd-threads@FreeBSD.ORG Wed Aug 6 14:25:49 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DE0637B401; Wed, 6 Aug 2003 14:25:49 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B20A43F75; Wed, 6 Aug 2003 14:25:48 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h76LPmwO040110; Wed, 6 Aug 2003 14:25:48 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h76LPmG0001385; Wed, 6 Aug 2003 14:25:48 -0700 (PDT) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h76LPmEU001384; Wed, 6 Aug 2003 14:25:48 -0700 (PDT) (envelope-from marcel) Date: Wed, 6 Aug 2003 14:25:47 -0700 From: Marcel Moolenaar To: deischen@freebsd.org Message-ID: <20030806212547.GC1179@athlon.pn.xcllnt.net> References: <20030806205308.GA1179@athlon.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i cc: threads@freebsd.org Subject: Re: KSE/ia64: a quick update X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2003 21:25:49 -0000 On Wed, Aug 06, 2003 at 05:12:40PM -0400, Daniel Eischen wrote: > > The thing to realize I guess is that once you trap, > you won't do it again until the FPU has been taken > away again. So you may only trap the first time, > and a few other times following that you may not. > You can have to weigh that against always using a > system call to restore the context. I'm not sure > what the difference would be. I haven't done any performance measurements. What I do know is that lazy switching of the high FP is a definite win, because they are hardly ever used. Once the ia64 port reaches some level of maturity I intend to use 1:1 threading to simulate multiple processes using the high FP registers and analyze how it behaves (including correctness). Based on that I probably want to make changes. > > I think I'll go with the following (for async contexts): > > > > o Use ifa and isr in the context to pass the pointer to the > > mailbox and the value we want to write to it. Both are > > only used by the kernel to pass information about the > > fault or interrupt to the kernel, so they are unused > > fields in contexts. > > o Set a flag in the context to indicate that we want the > > mailbox set (if applicable). > > o Use the break-based syscall path to call setcontext(2). > > o Have the kernel switch the context and set the mailbox. > > > > It's a bit of a hack, but I think other solutions are much > > more painful. Both implementation-wise and kludge-wise. > > If there's anything more we can do, let us know. With the MD bits in libkse revamped I don't have much to wish for. It would have taken us (me) a lot more work and time if we (I) had to do that at some later time. It looks like the async contexts are the only thing left and there's no revamp of KSE that can make that go away, so I guess I just have to solve it :-) I'll let you know when ACE fails to panic the kernel... -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net