linux-mips
[Top] [All Lists]

Re: [RFC] synchronized CPU count registers on SMP machines

To: Jun Sun <jsun@mvista.com>
Subject: Re: [RFC] synchronized CPU count registers on SMP machines
From: Dominic Sweetman <dom@mips.com>
Date: Thu, 5 Jun 2003 09:09:05 +0100
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <20030604183836.B25414@mvista.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030604153930.H19122@mvista.com> <20030604231547.GA22410@linux-mips.org> <20030604164652.J19122@mvista.com> <20030605001232.GA5626@linux-mips.org> <20030604183836.B25414@mvista.com>
Sender: linux-mips-bounce@linux-mips.org

> Therefore for a set of "conforming" SMP systems which don't
> have the listed 3 issues, we provide a feasible solution.
> I don't see how we can avoid this - unless we don't care about
> getting time right.

Interesting.  I guess you only need to get time "right enough" -
there's an unavoidable fuzziness about the synchronisation of events
on different CPUs (corresponding to the uncertainties of the timing of
any rendezvous between them).

A naive network synchronisation protocol - analogous to your first
proposal - would leave clocks differing by a network round-trip time
or so: but NTP does a lot better.  So in principle you should be able
to scale NTP to create a clock synchronised within some fraction of
the time taken by a CPU-to-CPU communication... but compressing the
essence of the NTP protocol into something which runs fast enough
might be interesting!

My 5-minutes-over-breakfast feeling is that you should be able to
figure out a way to get time right enough; try reading up how NTP
works and see whether it can be made to work?

--
Dominic


<Prev in Thread] Current Thread [Next in Thread>