From owner-freebsd-current@FreeBSD.ORG Mon Jan 31 07:56:46 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB4B616A4CE; Mon, 31 Jan 2005 07:56:46 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 042D943D1F; Mon, 31 Jan 2005 07:56:46 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id j0V7uiRR085972; Mon, 31 Jan 2005 08:56:44 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Mike Silbersack From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 31 Jan 2005 01:16:12 CST." <20050131011241.F64157@odysseus.silby.com> Date: Mon, 31 Jan 2005 08:56:44 +0100 Message-ID: <85971.1107158204@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: Robert Watson cc: current@FreeBSD.org cc: Colin Percival Subject: Re: tcp_isn_tick() / dummynet() callout madness ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2005 07:56:47 -0000 In message <20050131011241.F64157@odysseus.silby.com>, Mike Silbersack writes: >That sounds neat, but I'm not sure it's a good idea. In the case of tcp >timers, there are multiple locks that are relevant, if I'm not mistaken. >I also have this feeling that when mutex contention really matters, under >serious load, it wouldn't be a good idea to indefinitely delay some >callouts. It is a good idea, if nothing else because it prevents us from stalling softclock on a mutex we cannot get (for a long time). >I'd propose a simpler approach: Two callout wheels. A "fast" callout >wheel for short callouts (like tcp_isn_tick), and a "slow" callout wheel, >for things like tcp timers which we should handle quickly, but won't care >too much if they get delayed. That is a worse idea because it almost doubles the overhead. >Scott, in your reply to this you mention the importance of callouts firing >on time - do we have such important callouts? Thinking from a system >resource perspective, are there callouts that free memory, garbage >collect, etc? It would make sense to give those priority over less >critical timers which might block. Yes, timeout firing precision is important. -- 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.