From owner-freebsd-arch@FreeBSD.ORG Tue May 25 13:15:57 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 77C5F1065670; Tue, 25 May 2010 13:15:57 +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 CE5298FC08; Tue, 25 May 2010 13:15:56 +0000 (UTC) Received: by fxm17 with SMTP id 17so376372fxm.13 for ; Tue, 25 May 2010 06:15:55 -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=d5e4XUf53/x7/BxtG2Kv279XWHRowIP8pDrjNSJOmkw=; b=mEpDTypZfkf2duXm5KJPaZBXt3NiYBb5NvcBGZ08hZGinVtd8AgMrXeQElvHXiZ+hc 0krgDAutZSIBmUlYGTVBhRm/xOkAJ3zWHS2EouRDCpswK4WKSoW+woySW27XV2Pk3P+X vs2hoTbReVfv7TdR2msfkxl+qa5q2TJHjNBkQ= 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=UhzOZy4D7ZjPW/+WE4p78av7w/HhYSHOFEm+jc7oEPnPOggQqqB8YcfV7OcN4IWKVL d73doUzVHhd2M/EhwIIQ4uWcZrZvFBkpiUP8ENaNR+sU964kjeXQgfLA9qg5JC6g+fyx WK32Bx6MbRI6IoshuHi/JFp7sUiX+0nQwpu80= Received: by 10.223.64.205 with SMTP id f13mr6089760fai.98.1274793355645; Tue, 25 May 2010 06:15:55 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 7sm24781744far.6.2010.05.25.06.15.53 (version=SSLv3 cipher=RC4-MD5); Tue, 25 May 2010 06:15:53 -0700 (PDT) Sender: Alexander Motin Message-ID: <4BFBCD77.5030900@FreeBSD.org> Date: Tue, 25 May 2010 16:15:35 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: John Baldwin References: <4BFAA1F3.1070206@FreeBSD.org> <201005241530.05116.jhb@freebsd.org> In-Reply-To: <201005241530.05116.jhb@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: Tue, 25 May 2010 13:15:57 -0000 John Baldwin wrote: > On Monday 24 May 2010 11:57:39 am Alexander Motin wrote: >> You should agree that event timers code we have now (hardclock, >> statclock and profclock source) is real mess. The code is completely >> machine-dependent, many times duplicated (I have found 4 or 5 equal >> implementations and many more trivial ones), very tangled and >> inflexible. While it is acceptable for some platforms with single >> interrupt source running on hz, x86 with it's many different timers >> definitely doesn't look good. So I've decided to clean it. >> >> 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). > > Have you looked at the dynamic ticks patches on hackers@? Those already > include changes for 5), although he currently only has support for LAPIC and > is working on adding HPET support. Yes, I've seen it. But without complete timer stuff rewrite it seems hopeless to me. That is one more reason why I want to do it. -- Alexander Motin