64bit timestamp

Oliver Fromme olli at lurza.secnetix.de
Sun Mar 25 19:00:43 UTC 2007


deeptech71 at gmail.com wrote:
 > Oliver Fromme wrote:
 > > FreeBSD's UFS2 already uses 96bit timestamps, where 64 bits
 > > are used for seconds and 32 bits are used for nanoseconds.
 > > Is that sufficient for you?
 > 
 > What the hell for?

What's your problem?  In your first mail you seemed to be
complaining that there isn't sufficient range and accuracy
in the time stamps.  I explained to you that there is
indeed more accuracy than you thought, and now you complain
that there's too much of it?

To answer your question:  Modern hardware is already fast
enough that sub-microsecond accuracy is required.  Also
keep in mind that it is undesirable to change the on-disk-
format of a file system every year.  When the UFS2 format
was designed, it should be sufficient at least for the
needs of ten years in the future, possibly even more.
So the provision for nanosecond accuracy is not far off.

Ideally, two consecutive, non-parallel operations should
give two different timestamps.  That applies to creating or
touching a file or other kind of resource, or even just
calling the gettimeofday() function from within the same
thread, or whatever.  In reality that isn't the case today
for FreeBSD for other reasons, but the timestamp accuracy
of UFS2 would certainly be sufficient for that.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"C++ is over-complicated nonsense. And Bjorn Shoestrap's book
a danger to public health. I tried reading it once, I was in
recovery for months."
        -- Cliff Sarginson


More information about the freebsd-chat mailing list