From owner-freebsd-arch Sun Dec 12 5: 0:18 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 7797A14E12 for ; Sun, 12 Dec 1999 05:00:16 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id OAA22240 for ; Sun, 12 Dec 1999 14:00:14 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id OAA48974 for freebsd-arch@freebsd.org; Sun, 12 Dec 1999 14:00:13 +0100 (MET) Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 1A34E14EA0 for ; Sun, 12 Dec 1999 05:00:07 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from vigrid.com (pm3-pt10.pcnet.net [206.105.29.84]) by pcnet1.pcnet.com (8.8.7/PCNet) with ESMTP id HAA26560; Sun, 12 Dec 1999 07:59:58 -0500 (EST) Message-ID: <38539C2B.9632089A@vigrid.com> Date: Sun, 12 Dec 1999 07:59:23 -0500 From: "Daniel M. Eischen" X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 4.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Julian Elischer Cc: arch@freebsd.org Subject: Re: Recent face to face threads talks. References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Julian Elischer wrote: > > I promissed various people that I would report back what was discussed. Thanks! > We then discussed the ideas involved in a 'SA-style' approach. The > discussion was largely spent in getting everyone to understand the same > concepts in the same ways, and a lot of it was spent in working out > what subset of the SA style of things might be a good first step. > > A lot of time was spent discussing the mechanisms by which the UTS > received upcalls and how KSE's would resume. It was agreed that > thread classes could be implemented by a structure half way between a > process and a KSE on the linkage scale of things, that would own KSEs > and which would be scheduled onto processors. This basically corresponds > to what I've been calling a "subproc". In our diagrams it was designapted > "Q" as P was already taken (for Proc). This was actually an apt name as > this structure si what is put in the run queue. It was also agreed that to > start off this would be a virtual structure an it would be part of the > "proc" struct for the first revisions. Wouldn't this be akin to what other systems call a kernel thread or LWP? And could we use the same "Q" in our kernel for async I/O or interrupt threads? It could easily be attached or detached from a user space. It is important that this "Q" be able to have it's own resources though, and not necessarily be tied to a procs resources. > > KSE's would be on the sleep queues and Q's are on the run queues when > they have 1 or more KSE runnable. Where the User thread state was stored > during a syscall was discussed but I think this needs to be discussed > more. The discision was that we'd try do this without a new syscall > interface (except for one or two new syscalls (like the upcall > registration). Yes, we can pass the trapframe/context of a preempted or unblocked thread out to the upcall handler and not have to use a different call-gate. One advantage of another call-gate could be faster access to the unblocked thread. In order for the UTS to locate an unblocked thread from the information provided in the upcall, the UTS has to walk the unblocked thread list looking for the KSE ID. If you use another syscall-gate and provide the address of an IOCB, the address of the IOCB can be given to the blocked upcall handler. The UTS can then place the pointer to the thread struct in the IOCB. When the thread unblocks, the address of the IOCB is provided to the upcall handler and the UTS can just dereference it to find the thread struct. Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message