From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 31 14:14:13 2010 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 A6C21106566B for ; Wed, 31 Mar 2010 14:14:13 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 553948FC12 for ; Wed, 31 Mar 2010 14:14:11 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA20947; Wed, 31 Mar 2010 17:14:08 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4BB358B0.4090300@icyb.net.ua> Date: Wed, 31 Mar 2010 17:14:08 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: Tsuyoshi Ozawa References: <411a180c1003300537g2a1b4879u2d8d952ce9977cb5@mail.gmail.com> <411a180c1003300639l13d33451q305a61b2bcd6e3d5@mail.gmail.com> <20100330173504.GA70578@freebsd.org> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , Roman Divacky , Julian Elischer , freebsd-hackers Subject: Re: Dynamic ticks in FreeBSD 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: Wed, 31 Mar 2010 14:14:13 -0000 on 31/03/2010 15:05 Tsuyoshi Ozawa said the following: > Thank you for replying ! > > The patch for FreeBSD 8.0 original source is here : > http://gist.github.com/350230 > If this patch cause collision, I'm going to throw patch between > FreeBSD 8.0 HEAD and my chage. (sorry for this, I cannot connect to > CVS repository now for network reason. It take a few days to connect > CVS repository.) Thank you for this interesting and useful work! I looked through the code and here is my understanding of how it works, it coincides with how you described it, but I'd like to state it in my own words :-) 1. Instead of firing clock (LAPIC timer) interrupt regularly with a frequency derived from HZ, the interrupt is scheduled to fire (in one-shot mode) at the time of the soonest scheduled callout. 2. The code also makes sure to run hard/stat/prof-clocks if time since last interrupt is greater than their respective periods in !dyntick mode. Thus, it appears that in dyntick mode hard/stat/prof-clocks would run irregularly. I couldn't find any code that makes sure that the rest of the system handles this properly. Perhaps I missed it, or is it still in progress/plans? Also, I am not sure if the code handles the case when a new 'soonest' callout is scheduled after we already decided when to fire the next LAPIC timer interrupt. Thank you very much again! Please keep up the good work :) -- Andriy Gapon