wr-servo: make re-track much faster
There is no need to go to 0 phase at servo init. It is already 0
at the beginning of the world, but on re-track it can be the same
as it was.
With this change, if we loose track due to packet loss and timeout
(thanks to a few commits ago), we recover in 1..4 seconds as opposed
to 5..9 without this commit.
Tested with "fault drop 0 1000" and later "fault drop 0 0", and
a syslog server:
Jan 1 00:00:10 192.168.16.229 (22:33:44:55:66:77) Node up since 10 seconds
Mar 14 15:48:55 192.168.16.229 Tracking after 7.178 s
Mar 14 15:49:07 192.168.16.229 Lost track
Mar 14 15:49:11 192.168.16.229 2-th re-rtrack after 4.171 s
Mar 14 15:49:30 192.168.16.229 Lost track
Mar 14 15:49:32 192.168.16.229 3-th re-rtrack after 2.485 s
Mar 14 15:49:49 192.168.16.229 Lost track
Mar 14 15:49:51 192.168.16.229 4-th re-rtrack after 2.559 s
Mar 14 15:50:13 192.168.16.229 Lost track
Mar 14 15:50:16 192.168.16.229 5-th re-rtrack after 3.171 s
Mar 14 15:50:31 192.168.16.229 Lost track
Mar 14 15:50:32 192.168.16.229 6-th re-rtrack after 1.589 s
With the original commit for this, Adam found that by unplugging
and re-plugging the fiber our setpoint is always increasing, up to big
values. I checked, and the softpll is always using the module. I brought
the phase value up to hundreds of nanos both positive and negative, without
any issues. So this version of the commit makes a modulus of the set
point, to avoid it getting too big and scare a user watching the logs.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Showing
Please
register
or
sign in
to comment