[Top][All Lists]

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

Re: New SHM

From: Gary E. Miller
Subject: Re: New SHM
Date: Fri, 20 Jan 2023 12:43:52 -0800

Yo Hal!

On Fri, 20 Jan 2023 12:20:09 -0800
Hal Murray <> wrote:

> Your current code has 2 1/2 memory barriers.  That's the same as my 2
> counter proposal.

I rather not take responsibility for the current code.  Not mine.

And gpsd only has 2 threads, while ntpd has just one.  The next
solution needs to be multi0thread and multi-reader freindly.

> As long as we are mucking in this area, should we take the
> opportunity and do a big jump and convert to a new way of doing
> things?

We have to do both.  Maintain back compatibility, and go forward.

> Support old and new SHM until we can drop old.

How about no new SHM?  It is a mess from many angles.  The current SHM
does not come close to being POSIX compliant.  There is no way to fix
it the old way.

No need for a new solution.  A well tested solution already exists.

The chrony socket protocol has been doing everything we need here, and
more. It is well established, debugged and documented.

It needs no locking

It supports 32-bit and 64-bit time_t

It already has a MAGIC value (sorta like a version.

It has much better access control.

It supports single writer multiple reader.

It avoids all the issues we know, and hate, about SHM.

Long past time for ntpd to support chrony sockets.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgp3T8hg64vAn.pgp
Description: OpenPGP digital signature

reply via email to

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