Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Feb 2005 07:33:23 +0100
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Ian Dowse <iedowse@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 
Message-ID:  <3212.1107758003@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 07 Feb 2005 02:47:33 GMT." <200502070247.j172lXIi069498@repoman.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3212.1107758003>