Date: Tue, 28 Nov 2000 13:12:53 -0500 (EST) From: Daniel Eischen <eischen@vigrid.com> To: Julian Elischer <julian@elischer.org> Cc: arch@FreeBSD.ORG Subject: Re: Thread-specific data and KSEs Message-ID: <Pine.SUN.3.91.1001128124003.15989A-100000@pcnet1.pcnet.com> In-Reply-To: <3A227FF2.FD2CC41E@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1001128124003.15989A-100000>