From owner-freebsd-arch Tue Nov 28 10:13:25 2000 Delivered-To: freebsd-arch@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id C7E6937B400 for ; Tue, 28 Nov 2000 10:13:22 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id NAA21649; Tue, 28 Nov 2000 13:12:54 -0500 (EST) Date: Tue, 28 Nov 2000 13:12:53 -0500 (EST) From: Daniel Eischen To: Julian Elischer Cc: arch@FreeBSD.ORG Subject: Re: Thread-specific data and KSEs In-Reply-To: <3A227FF2.FD2CC41E@elischer.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 27 Nov 2000, Julian Elischer wrote: > > One thing I just realised: > > If we are using defered FP state saving and restoring in the kernel, then we > will have troubles with that when switching threads in userland, since the > handler for that is in the kernel. Of course we could set the place for it in > the KSE mailbox and let the kernel save the information when it needs it. Our current threads library knows when to save and restore FP state; it currently only happens when a signal is received (for i386, I think alpha FP state is always saved both in jmp_buf and ucontext_t). I think we want to avoid saving and restoring FP state unless it's necessary. That's probably only when a fault occurs or when the KSE is preempted. I like the idea of having the kernel save the FP state in the thread state storage area (ucontext_t?) in the KSE mailbox thingy. Also, are we going to allow the kernel to follow links out of the mailbox, or are we going to limit UTS<->kernel communication to just this one page? I think it might be preferable to only communicate via the mailbox and never have the kernel attempt to read/write to other areas of KSE/thread storage. For instance, we could place the pointer to the thread state storage area in the mailbox. But that would require a copyin, and then a copyout to another page that might be paged out. The drawback of only using the mailbox is that it requires an additional copy by the UTS every time an upcall is made (to copy the thread state from the mailbox to the storage area in the thread). -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message