cvs commit: src/sys/net bpf.c

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Jul 25 20:26:59 UTC 2006


In message <200607252123.aa75409 at salmon.maths.tcd.ie>, David Malone writes:
>> I'm not sure I know what you mean by "trivial timecounter", but the
>> only reason we don't have a way to deregister a timecounter yet is
>> that so far I'm probably the only one who have ever need it :-)
>
>I was thinking about this recently too actually, as I was going to
>see how good the 64 bit counter on ath cards was in comparison to
>other things that were available.

The first gottcha to look out for is upper/lower half rollover issues,
if you read it as two 32 bit registers: you need to check if the
lower part rolled over without the upper part getting updated, or
the more pathological case: the upper part being updated before
the lower part rolled voer.

32 bits is quite likely to be enough for a timecounter so that may
not even be an issue.

Next is the matter of the crystal that drives it, the temperature
stability of that xtal etc etc.


>other things that were available. I'm not sure how much complexity
>a timecounter that could vanish at any moment would introduce - I
>didn't get that far yet.

It's not too bad, we can switch pretty quickly.

-- 
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 cvs-src mailing list