weird fxp / timecounter interaction in top-of-tree

Poul-Henning Kamp phk at phk.freebsd.dk
Sun Apr 6 11:54:11 PDT 2003


In message <xzp4r5bmpuv.fsf at flood.ping.uio.no>, Dag-Erling =?iso-8859-1?q?Sm=F8
rgrav?= writes:
>"Poul-Henning Kamp" <phk at phk.freebsd.dk> writes:
>> > and tc_init() to use the *first* timecounter it runs across (on i386,
>> > this is generally the i8254), leaving the admin to pick another one if
>> > the default does not suit her.  See the attached patch.
>> This is wrong.  Please do not commit it.
>
>OK.  Any suggestion as to how we could rank timecounters so we can
>switch to a better one when it becomes available?  Is this something
>we can determine statically (with a compiled-in preference list), or
>do we have to determine it at run time?

Defining "best" is at best hard, so I have resorted to the simple
technique we use now:  Don't call tc_init on a timecounter unless
you want to use it.

Provided people set it sensibly, we could add a "priority" field
to the timecounter structure and have tc_init() respect that.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at 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.


More information about the freebsd-current mailing list