From owner-freebsd-arch@FreeBSD.ORG Tue Nov 30 18:03:22 2004 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 778AC16A4CE for ; Tue, 30 Nov 2004 18:03:22 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5A7243D5A for ; Tue, 30 Nov 2004 18:03:21 +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 iAUGYjUL050016; Tue, 30 Nov 2004 17:34:45 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Ian Dowse From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 17 Nov 2004 23:22:56 GMT." <200411172322.aa34520@salmon.maths.tcd.ie> Date: Tue, 30 Nov 2004 17:34:45 +0100 Message-ID: <50015.1101832485@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: arch@freebsd.org Subject: Re: Simpler SMP-friendly callout/timeout semantics 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: Tue, 30 Nov 2004 18:03:22 -0000 In message <200411172322.aa34520@salmon.maths.tcd.ie>, Ian Dowse writes: > >The current callout/timeout API supports Giant-locked and MP-safe >usage options, but in both cases it is very difficult to use the >API in a way that is free of race conditions and complications. >Below is an attempt to extend that API to offer much simpler semantics >to many users while not limiting its usefulness or performance. > >Do people think that a change like this is worth attempting? Are >there further improvements that could be made or any other suggestions >or comments? Sounds good to me. Do you try to optimize softclock to not stall on the mutex and instead find any other pending callouts to handle ? -- 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.