From owner-freebsd-hackers Mon Aug 21 18:13:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 4CE7537B423; Mon, 21 Aug 2000 18:13:18 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e7M1DGJ12836; Mon, 21 Aug 2000 18:13:16 -0700 (PDT) Date: Mon, 21 Aug 2000 18:13:16 -0700 From: Alfred Perlstein To: Robert Watson Cc: Jonas Bulow , hackers@FreeBSD.ORG Subject: Re: freebsd and non-preemtive threads Message-ID: <20000821181316.J4854@fw.wintelcom.net> References: <3997C2C5.83AFE056@servicefactory.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: ; from rwatson@FreeBSD.ORG on Mon, Aug 21, 2000 at 09:01:13PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Robert Watson [000821 18:01] wrote: > > For reference, my recollection is that peemption-aware userland thread > libraries tend to make alot of timer syscalls, losing some of the > advantage of being a userland thread library (low context switch cost, few > transistions between user/kerneland). The AFS LWP code included a > fasttime() mechanism that took advantage of the ability to mmap kernel > memory under SunOS, allowing direct access to the timer variable in > kernel, without a context switch. I do not believe that native ports to > Linux/FreeBSD/et al have retained this capability, especially given its > requirements for privilege. However, it would be easy to imagine a kernel > module exporting a /dev/time, which had the singular ability of allowing > the mmaping of a page containing only the kernel's timer variables, > permitting syscall-free precise time access from userland using atomic > memory access calls. I think phk and I discussed this about a year ago, our idea was to automatically map the segment in for each process (also allowing things like getpid and such to be accessable). It would be nice to see happen either way (mmap'able /dev/time or automatically) -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message