From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 30 19:29:08 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D97E41065677; Mon, 30 Mar 2009 19:29:08 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0E58FC18; Mon, 30 Mar 2009 19:29:08 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.14.3/8.14.3) id n2UJT4Re092034; Mon, 30 Mar 2009 12:29:04 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id wyb3gig2xvn2yrzqw5jg5d3djs; Mon, 30 Mar 2009 12:29:03 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <49D11D7F.2020503@freebsd.org> Date: Mon, 30 Mar 2009 12:29:03 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.19) Gecko/20090226 SeaMonkey/1.1.14 MIME-Version: 1.0 To: Poul-Henning Kamp References: <9969.1238398362@critter.freebsd.dk> In-Reply-To: <9969.1238398362@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Sack , freebsd-current@freebsd.org, prashant.vaibhav@gmail.com, FreeBSD Hackers Subject: Re: Improving the kernel/i386 timecounter performance (GSoC proposal) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 19:29:09 -0000 Poul-Henning Kamp wrote: > In message <20090329180745.GB38985@server.vk2pj.dyndns.org>, Peter Jeremy write > s: > >>> I'm assuming folks are still in love with the TSC because it still the >>> cheapest as oppose ACPI-fast or HPET to even contemplate this? >> That is its major advantage. It might be feasible to export all the >> data necessary to implement the complete CLOCK_*_FAST family. > > The general attraction is that it can be read from userland by unpriviledged > programs. > > On systems where the ACPI or HPET hardware can be memory-mapped, I should > be equally possible to map those read-only into userland processes. > > Now _THAT_ would be interesting. Which brings us back to having a page of code provided by the kernel so that the kernel can determine the appropriate implementation (depending on the hardware availability) and so that userland can invoke the functions without going through a task switch. Libc can then either invoke these directly or, if the page is unavailable for any reason, use the system calls. Tim