Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-22 Thread David Gravereaux
On 08/20/2013 01:51 PM, David Gravereaux wrote:
> Also, and still back to my question, NTPd's control of the radio and PPS
> signal wouldn't be using the same PPS kernel service would it?

Answering my own question, the clock at /dev/ptp0 (on the NIC) is not
the same as the realtime and needs to be disciplined with the phy2sys
utility or in some other manner.

-- 
David Gravereaux 



signature.asc
Description: OpenPGP digital signature
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread Poul-Henning Kamp
In message 
, Wojciech Owczarek writes:

>> support for timing electrical signals
>> using the same free-running counter as used for the PTP packets.
>
>Sounds interesting. Can you elaborate? Does the card then run its own clock?

Yes, it has a free running counter and can timestamp packets received
and transmitted (if they match a particular filter) and timestamp
(and possibly generate) external signals as well.

Read the datasheet...

>or other dedicated timing NICs? What makes it stand out so much - is it
>just that
>it supports all that's needed without being marketed as a precision timing
>NIC?

Price.


-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread Wojciech Owczarek
On 20 August 2013 21:16, Poul-Henning Kamp  wrote:

> You never should, for precision timekeeping, for a host of technical
> hacks, all outside your control.
>

I brought up TSC only as a, to me, better alternative to HPET / ACPI.

Of course it's not good enough for serious timekeeping, no "mostly
software" clock is.


> support for timing electrical signals
> using the same free-running counter as used for the PTP packets.


Sounds interesting. Can you elaborate? Does the card then run its own clock?

>
>

but it's the best chip there is right now


OK, different price range, but do you think it trumps the likes of
SolarFlare's 10GE
adapters with dedicated OCXOs, or copper-only cards with OCXOs like
Oregano's,
or other dedicated timing NICs? What makes it stand out so much - is it
just that
it supports all that's needed without being marketed as a precision timing
NIC?

Best regards
Wojciech
-- 
-

Wojciech Owczarek
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread Wojciech Owczarek
On 20 August 2013 19:12, Mike S  wrote:

On modern x86 processors, both Intel and AMD, the tsc increments at a
> constant rate, independent of the CPU frequency.


I keep forgetting about constant_tsc.

-- 
-

Wojciech Owczarek
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread David Gravereaux
On 08/20/2013 01:16 PM, Poul-Henning Kamp wrote:
> In message <5213b89d.4070...@pobox.com>, David Gravereaux writes:
> 
>> I guess I can't go with TSC on this hardware.
> 
> You never should, for precision timekeeping, for a host of technical
> hacks, all outside your control.


Good to know, thanks.  I was contemplating moving this over to
PC/104-Express after getting a leg up on this workstation.  Now, this
gives me a real reason.


-- 
David Gravereaux 



signature.asc
Description: OpenPGP digital signature
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread David Gravereaux
On 08/20/2013 01:16 PM, Poul-Henning Kamp wrote:
> In message <5213b89d.4070...@pobox.com>, David Gravereaux writes:
> 
>> I guess I can't go with TSC on this hardware.
> 
> You never should, for precision timekeeping, for a host of technical
> hacks, all outside your control.
> 
> The most interesting hardware for precision timekeeping these days
> are the Intel 82599 10Gbit/s ethernet controller, which has support
> for PTP packet stamping *AND* support for timing electrical signals
> using the same free-running counter as used for the PTP packets.
> 
> It's only somewhat semi-documented in the 1000 page data-sheet,
> but it's the best chip there is right now, and a board will
> only set you back a few hundred USD.


How does that compare to the i210 which I'm using?  Off-hand, it's using
the same igb driver with the PTP and PPS kernel services.

Also, and still back to my question, NTPd's control of the radio and PPS
signal wouldn't be using the same PPS kernel service would it?

That would great, but still I'm not sure.

-- 
David Gravereaux 



signature.asc
Description: OpenPGP digital signature
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread Poul-Henning Kamp
In message <5213b89d.4070...@pobox.com>, David Gravereaux writes:

>I guess I can't go with TSC on this hardware.

You never should, for precision timekeeping, for a host of technical
hacks, all outside your control.

The most interesting hardware for precision timekeeping these days
are the Intel 82599 10Gbit/s ethernet controller, which has support
for PTP packet stamping *AND* support for timing electrical signals
using the same free-running counter as used for the PTP packets.

It's only somewhat semi-documented in the 1000 page data-sheet,
but it's the best chip there is right now, and a board will
only set you back a few hundred USD.


-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread David Gravereaux
Thanks guys.  This is getting interesting.

$ dmesg|grep clock
[0.255576] hpet clockevent registered
[0.258069] Switching to clocksource hpet
[1.155479] rtc_cmos 00:03: setting system clock to 2013-08-17
20:38:33 UTC (1376771913)
[1.382147] PTP clock support registered
[7.640035] intel8x0_measure_ac97_clock: measured 54638 usecs (2680
samples)
[7.640040] intel8x0: clocking to 46972

$ dmesg|grep tsc
[0.00] tsc: Fast TSC calibration using PIT
[0.00] tsc: Detected 2412.241 MHz processor
[0.00] tsc: Marking TSC unstable due to TSCs unsynchronized


I guess I can't go with TSC on this hardware.

Generally, for now, what I'm asking is...  If NTPd is managing the radio
and slewing with the PPS, the PTP daemon (ptp4l) will be taking time
from the same system source?  Granted, PTP time is not the same as Unix
time, and maybe I'm not understanding the use of the phc2sys utility?

Probably a better question for the linuxptp group.

-- 
David Gravereaux 



signature.asc
Description: OpenPGP digital signature
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread Mike S

On 8/20/2013 1:41 PM, Wojciech Owczarek wrote:

True, this will help, and needless to say, dynamic CPU frequency etc. is a
no-no,


On modern x86 processors, both Intel and AMD, the tsc increments at a 
constant rate, independent of the CPU frequency.


___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread Wojciech Owczarek
On 20 August 2013 17:16, Mike S  wrote:

>
> By default, the tsc is calibrated at each boot, which means that timing
> will likely change (and ntp drift values will be off) each time you boot.
>
> There's a linux kernel command line option which will fix that and provide
> consistency between boots, something like  "clocksource=tsc
> tsc_khz=2410988". The exact value depends on how fast the processor is
> clocked.


True, this will help, and needless to say, dynamic CPU frequency etc. is a
no-no, and it's best to bind the (ntp) process to a single CPU core.
However I find it that the drift differences will be sub-1ppm across
reboots. In my case (data center) they are in fact sub-500ppb - calculated
with ptpd.

You always need some stabilisation time after reboot, especially that your
wall clock will likely get re-initialised from RTC. I think overcoming that
may sometimes take longer than re-calculating drift.

I pointed to TSC mostly because of the PTP GM side of the original poster's
query.

Regards
Wojciech

-

Wojciech Owczarek
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread Mike S

On 8/20/2013 11:40 AM, Wojciech Owczarek wrote:

I would recommend the TSC time source: lowest read overhead.

All three have different behaviours - different (cold start) frequency
offset and different drift rates once stabilised and then left drifting.


By default, the tsc is calibrated at each boot, which means that timing 
will likely change (and ntp drift values will be off) each time you boot.


There's a linux kernel command line option which will fix that and 
provide consistency between boots, something like  "clocksource=tsc 
tsc_khz=2410988". The exact value depends on how fast the processor is 
clocked.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread Wojciech Owczarek
On 20 August 2013 11:03, David Gravereaux  wrote:

> Hi,
>
> I've been lurking a bit and absorbing.
>

So have I.


> Are the 3.58 MHz ACPI timers okay or should I use the 25MHz HPET ones
> for system clock?


I would recommend the TSC time source: lowest read overhead.

All three have different behaviours - different (cold start) frequency
offset and different drift rates once stabilised and then left drifting.
However reading time with TSC time source takes least amount of time and id
least prone to jitter , which helps with timestamp accuracy.

Regards
Wojciech

 --
-

Wojciech Owczarek
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


[time-nuts] PTPv2 grandmaster with a Z3805A?

2013-08-20 Thread David Gravereaux
Hi,

I've been lurking a bit and absorbing.  On order is an HP/SYMMETRICOM
Z3805A GPS Disciplined Oscillator and a PCTEL GPS-TMG-HR-26NCM antenna.

Target computer is running Linux and has a spare comport.

From what I've been reading, ntpd will work the hpgps driver, but will
require a few mods for 9600 baud instead of 19200 and the size of the
buffer needs to be increased for the :print:status command.

With ntpd communicating with the radio, I guess it's rather straight-up
to run linuxptp  as well and
all should work, right?

The NIC card is an Intel i210 and supports hardware timestamping.  My
Ethernet switch also supports 1588 as Class A traffic.

I can't seem to find a manual specific for the Z3805A.

Are the 3.58 MHz ACPI timers okay or should I use the 25MHz HPET ones
for system clock?

-- 
David Gravereaux 



signature.asc
Description: OpenPGP digital signature
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.