From owner-freebsd-arch@FreeBSD.ORG Wed May 26 20:02:30 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27944106564A; Wed, 26 May 2010 20:02:30 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 81AD38FC15; Wed, 26 May 2010 20:02:29 +0000 (UTC) Received: by fxm12 with SMTP id 12so88990fxm.13 for ; Wed, 26 May 2010 13:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=5M5Gv8j1t5sIk0znbGr1WINArje3Xr0KcQXBMr+4IXE=; b=cDpYhU2rWybqNGHsYMs7GS1cbVoCWmxbv0RRkzW4N6tEEa/EC4RJASCsyCyfbULjNv 1tPaXE0auE41snPYTmr6pVfegsqWNz8HhvinNMO18fBz9s3ERqxVDmqgqOIV2HecYVFc 2ksWtWOY0OB/8D85v0Z/phpYeCyg+omFi9RdE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=Lf3aB+ebFWOYBzEDimUR0ZoIomUWg83EcIL+3GU2xOE25Sf4dnS4rHYnYIYAn88Mrd a9cA5WaXY9/t0U7gg4wjXhmjE9Y6Kdv1lf1PoePrzXq+u2KHs7g9BPyAibrRb00ovgP4 IIdSn+3uiY3QviyiMk0P3ItssQ8TVAWjF3fOI= Received: by 10.223.5.89 with SMTP id 25mr8298396fau.87.1274904148366; Wed, 26 May 2010 13:02:28 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id z12sm1942132fah.21.2010.05.26.13.02.26 (version=SSLv3 cipher=RC4-MD5); Wed, 26 May 2010 13:02:27 -0700 (PDT) Sender: Alexander Motin Message-ID: <4BFD7E35.9070901@FreeBSD.org> Date: Wed, 26 May 2010 23:01:57 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Andriy Gapon References: <4BFAA1F3.1070206@FreeBSD.org> <4BFAAA47.5060802@freebsd.org> <4BFAB0C5.1020002@FreeBSD.org> In-Reply-To: <4BFAB0C5.1020002@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: Event timers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2010 20:02:30 -0000 Alexander Motin wrote: > Andriy Gapon wrote: >> on 24/05/2010 18:57 Alexander Motin said the following: >>> I have defined several points on that way: >>> 1*. clean low-level timer drivers from unrelated stuff, >>> 2*. make some common code machine-independent, >>> 3. write common driver API for event timers (alike to one we have now >>> for time counters) to make adding more drivers possible, >>> 4. add support for HPET as event timer in addition to time counter, >>> 5. add support for timers in one-shot mode (LAPIC and HPET). >> I wonder how much you have progressed for 3,4,5. > > Not really much yet. Learned existing code and hardware specs, have some > thought and ready to proceed. Here is first approach to 3: http://people.freebsd.org/~mav/et.20100526.patch , - created common API, heavily refactored attimer, atrtc and lapic drivers, written simple and formal common code. Now it is possible to use any one or two of these three drivers for either hardclock or statclock by just changing weights or disabling them. Tested on i386, should work on amd64, probably broken on XEN and pc98 for now. -- Alexander Motin