From owner-freebsd-arch Tue Nov 30 9:45: 1 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 9BFFF15981 for ; Tue, 30 Nov 1999 09:44:52 -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 SAA09274 for ; Tue, 30 Nov 1999 18:44:51 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id SAA71530 for freebsd-arch@freebsd.org; Tue, 30 Nov 1999 18:44:51 +0100 (MET) Received: from plunger.gdeb.com (plunger.gdeb.com [153.11.11.3]) by hub.freebsd.org (Postfix) with ESMTP id 4273C1598E for ; Tue, 30 Nov 1999 09:43:17 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from orion.caen.gdeb.com ([153.11.109.11]) by plunger.gdeb.com with ESMTP id MAA04419; Tue, 30 Nov 1999 12:36:29 -0500 (EST) Received: from vigrid.com (clcrtr [153.11.109.129]) by orion.caen.gdeb.com (8.9.3/8.9.3) with ESMTP id MAA93794; Tue, 30 Nov 1999 12:38:52 -0500 (EST) (envelope-from eischen@vigrid.com) Message-ID: <38440BAB.E547CA61@vigrid.com> Date: Tue, 30 Nov 1999 12:38:51 -0500 From: "Daniel M. Eischen" X-Mailer: Mozilla 4.51 [en] (X11; U; FreeBSD 3.2-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Julian Elischer , arch@freebsd.org Subject: Re: Threads stuff References: <384270AE.D0250340@vigrid.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Daniel M. Eischen" wrote: > > Julian Elischer wrote: > > > Yes, I understood them just fine :) I'm still not sold on the new > > > syscall gate and IOCB, because I think we have to make at least one > > > system call when threads are switched or resumed. > > > > > > > I'm not completely sold on them either. > > I just have a gut feeling on it based on doing this for 25 years. > > Well let's see if we can make them work, now that we know more > of the issues. > > One potential problem I see with placing the IOCBs at a fixed location > in the calling threads stack is that you then are tied to having > to find TSD for every system call. I say TSD, but really mean > you have to go through the same hoops as getting TSD. We don't > know how fast this is going to be for i386. > > I think if we allocate the IOCB from the stack at the time > of the system call, it will be faster. If the thread blocks, > then kernel can provide enough information so that the UTS > upcall can find the IOCB, set the IOCBptr in the current > thread, mark the thread as blocked, etc. Aside from the above issue, the other issue I had with Julians async-call gates and having the kernel complete the KSEs is that the UTS needs an "interrupt" type mechanism in order to check for threads in wait/timeout conditions and to preempt running threads that have exceeded their quantum. My argument was that we need to perform at least one system call for each thread switch in order to achieve this, so why have an async-call gate if we have to reenter the kernel anyways? I think we can fulfill our needs with a fixed interval timing mechanism, and to properly account for time spent in the system on a per-KSE basis. So, FWIW, I am prepared to sign up to Julians async call gate proposal. I think we can perform thread switches totally in userland without any assistance from the kernel. Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message