[Bug 2180] New: _TOD_Get_with_nanoseconds() is broken on SMP
Chris Johns
chrisj at rtems.org
Thu Aug 21 20:47:01 UTC 2014
On 21/08/2014 11:51 pm, Gedare Bloom wrote:
> On Thu, Aug 21, 2014 at 3:03 AM, Sebastian Huber
> <sebastian.huber at embedded-brains.de> wrote:
>> On 20/08/14 16:05, Joel Sherrill wrote:
>> The clock handling is entirely broken on SMP and not scalable. Our clock
>> infrastructure is only good enough for uni-processor systems, but even here
>> the usage of nanosecond timestamps is suboptimal. I would rather use
>> something like the FreeBSD time hands:
>>
>> http://phk.freebsd.dk/pubs/timecounter.pdf
>>
> Nice. It looks like it would take:
> 1) Convert the 64-bit timestamps into bintime: a split time_t
> 'seconds' + uint64_t 'frac' format. The math is shown in the paper.
> 2) A lock-free ring buffer for the timehands.
> 3) The timecounter structure that describes the hw clock source, and a
> way to register timecounters from BSPs.
> 4) Rewrite tick handling to do the refresh operation.
>
> Did I miss anything?
>
If we implement this it would be nice to get NTP working cleanly with
RTEMS. The RSB is now building NTP.
Chris
More information about the devel
mailing list