[Top][All Lists]

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

Re: [gpsd-dev] Updated docs on NTP segment management

From: Gary E. Miller
Subject: Re: [gpsd-dev] Updated docs on NTP segment management
Date: Wed, 18 Feb 2015 14:04:39 -0800

Yo Hal!

On Wed, 18 Feb 2015 02:08:14 -0800
Hal Murray <address@hidden> wrote:

> address@hidden said:
> > I see no reason to make it not writeable by the client.  So no
> > need, yet, for a compatibility break. 
> The current setup doesn't work with more than one client.  I can't
> run a debugging monitor in parallel with ntpd.
> It also simplifies security.  If the client side is read-only, a
> layer of attacks go away without any sysadmin setup complications.

I have never seen the ntpshm thing as a heavy lifter, but more as
a super lightweight protocol ideal for small embedded systems.

For what you want the JSON protocol is much more suitable.  We'll
get that going in 3.13.

> > Sadly read order can not be fixed on many architectures, like x86.  
> > So X and Y may have been flushed by the cache to main RAM, but not
> > the data it is guarding. 
> I'm not a wizard on this area.  I have worked with people who are.
> When I asked one of them, he gave me that recipe.  When I asked about
> cache flushes and such, he said that x86 hardware does the right
> thing.

Not been my experience, and the world is not all x86.  Getting it
right is very architecture specific, and that is what libc is for.
Dn't reinvent the hwheel (badly).

> I think the actual code needs volatiles in the right places (so the
> compiler will do the right thing) and a few memory barriers on some
> architectures.

gpsd has seen that volatiles do not work as expected (you'd have to
check the archives) and memory barriers are essential.  Sadly 
memory barriers play havoc with multi core systems while cores wait 
for everything to flush and refill.

> Do you know of a good web page covering this area?  I've looked
> before without finding anything.  I just tried again, this looks like
> great background, but I haven't found the section that discusses
> specific architectures.

We went over this in great detail on gpsd-dev a few years ago.  Time
to do it again I guess.  

For the next few days gpsd-dev should focus on 3.12 release, then 
come back to this.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588

reply via email to

[Prev in Thread] Current Thread [Next in Thread]