Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Nov 2000 21:21:39 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        arch@FreeBSD.org, mark@grondar.za, John Hay <jhay@icomtek.csir.co.za>
Subject:   Re: new monotime() call for all architectures. 
Message-ID:  <26144.974492499@critter>
In-Reply-To: Your message of "Fri, 17 Nov 2000 11:53:50 PST." <XFMail.001117115350.jhb@FreeBSD.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <XFMail.001117115350.jhb@FreeBSD.org>, John Baldwin writes:
>
>On 17-Nov-00 Poul-Henning Kamp wrote:
>> 
>>>> Ok, I just thought the "mono" in his function name is for monotonic. If
>>>> you are staying on one processor it will work, but if the timestamps
>>>> have scheduling inbetween the timestamps and you land on a different
>>>> processor it won't be monotonic anymore.
>>>
>>>It's close enough. :)
>> 
>> If it isn't dealing properly with async PCC/TSC counters on SMP machines
>> it shouldn't be called "monoanyting".
>> 
>> I guess I totally object to the name now :-)
>
>It will be increasing at least. :)  (except for occasional cases when you get
>events close together on 2 CPU's that are within the drift between teh CPU's
>and in the right order to result in the later event coming "earlier").

It will flicker forth and back, because there may be a finite, but
potentially large and pretty constant offset between the counters.

Unless this function returns a monotonic increasing (modules
the inevietable wraparound) integer of some width, it should not
be called "mono*".

Unless it returns true units of time it should not be called "*time".

--
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.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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