From owner-freebsd-arch@FreeBSD.ORG Sat Oct 18 13:05:43 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDDC816A4B3 for ; Sat, 18 Oct 2003 13:05:43 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E7DB43FCB for ; Sat, 18 Oct 2003 13:05:42 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.10/8.12.10) with ESMTP id h9IK5eon009671; Sat, 18 Oct 2003 22:05:40 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Nate Lawson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 18 Oct 2003 13:02:29 PDT." <20031018130119.T47207@root.org> Date: Sat, 18 Oct 2003 22:05:40 +0200 Message-ID: <9670.1066507540@critter.freebsd.dk> cc: arch@freebsd.org Subject: Re: Variable timer tick rate? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Oct 2003 20:05:43 -0000 In message <20031018130119.T47207@root.org>, Nate Lawson writes: >This is an interesting approach. If there are no upcoming timeouts, >decrease the tick rate. Of course, you have to amortize the cost of >resetting the timer over the period of no ticks. > >http://kerneltrap.org/node/view/1006 Yes, unfortunately we may have a couple of timeout() (ab)users which use it to implement "as fast as possible polling" by calling timeout with a 1 tick argument, so last I looked (a couple of years ago) it fired every tick. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.