tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Synchronization protocol around TODR / time-related variables



> On Dec 24, 2019, at 1:17 PM, Andrew Doran <ad%netbsd.org@localhost> wrote:
> 
> Looks like it wouldn't be too hard to wrap this in a function to return it
> and at least keep the problem in one place.  Ah ha!  When searching for
> boottime on OpenGrok I found a FreeBSDism in the NFS code that we pulled in:
> getboottime().  Digging into it a bit further, it seems they have managed
> this using the same concurrency strategy used for timecounters:

It looks to me like in our kern_tc.c, timebasebin has actually replaced the historical function of the boottime variable, though I have to admit I haven't fully wrapped my head around kern_tc.c.  Anyway, if that's true, we can nuke the old boottime completely, and have getboottime() return the converted-to-ts value of timebasebin using the same lockless strategy.

Agree?

-- thorpej



Home | Main Index | Thread Index | Old Index