From owner-cvs-all@FreeBSD.ORG Mon Feb 7 06:33:27 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B6A6516A4CE; Mon, 7 Feb 2005 06:33:27 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id D60E643D53; Mon, 7 Feb 2005 06:33:26 +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 j176XN8D003213; Mon, 7 Feb 2005 07:33:23 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Ian Dowse From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 07 Feb 2005 02:47:33 GMT." <200502070247.j172lXIi069498@repoman.freebsd.org> Date: Mon, 07 Feb 2005 07:33:23 +0100 Message-ID: <3212.1107758003@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 Makefile timeout.9 src/sys/sys callout.h src/sys/kern kern_timeout.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2005 06:33:27 -0000 In message <200502070247.j172lXIi069498@repoman.freebsd.org>, Ian Dowse writes: >iedowse 2005-02-07 02:47:33 UTC > > FreeBSD src repository > > Modified files: > share/man/man9 Makefile timeout.9 > sys/sys callout.h > sys/kern kern_timeout.c > Log: > Add a mechanism for associating a mutex with a callout when the > callout is first initialised, using a new function callout_init_mtx(). > The callout system will acquire this mutex before calling the callout > function and release it on return. Great! But can we make softclock() use a two pass algorithm ? First pass take all the timeouts which have a mutex which we can get with mtx_lock_try() then in second pass all the rest of the callouts for this tick ? This would improve latency for well-written/locked code. -- 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.