Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 April 01, 2023 02:28PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 April 02, 2023 03:01AM |
Registered: 9 years ago Posts: 461 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 April 10, 2023 12:42PM |
Registered: 7 years ago Posts: 184 |
Quote
Perhaps you should try the kernel images hosted at Natisbad (where support for the device was first introduced) to see if the issue has been present from the introduction of support for this device.
~ # uname -a Linux RN102 4.4.1.rn102 #1 Tue Feb 9 23:58:40 CET 2016 armv7l GNU/Linux ~ # cat /proc/uptime 326.53 312.33 ~ # cat /proc/uptime 381.52 367.32 ~ #
BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash) Enter 'help' for a list of built-in commands. ~ # uname -a Linux RN102 3.14.44.rn102 #1 Thu Jun 11 18:30:21 CEST 2015 armv7l GNU/Linux ~ # cat /proc/uptime 113.57 99.86 ~ # cat /proc/uptime 168.80 155.08 ~ #
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 June 15, 2024 02:31PM |
Admin Registered: 13 years ago Posts: 18,994 |
g762: g762@3e { compatible = "gmt,g762"; reg = <0x3e>; clocks = <&g762_clk>; /* input clock */ fan_gear_mode = <0>; fan_startv = <1>; pwm_polarity = <0>; }; ... clocks { g762_clk: g762-oscillator { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <8192>; }; };
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 June 15, 2024 02:37PM |
Registered: 7 years ago Posts: 184 |
Quote
The significant difference between the Mirabox and this RN 102/104 is: the oscillator.
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 June 15, 2024 02:46PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 June 15, 2024 02:50PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 June 15, 2024 02:54PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 June 16, 2024 04:20AM |
Registered: 7 years ago Posts: 184 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 June 16, 2024 02:23PM |
Admin Registered: 13 years ago Posts: 18,994 |
Quote
I strongly believe the cause of the lagging system clock must be inside the SOC since apparently time is lagging as soon as the kernel starts its internal timer (see https://forum.doozan.com/read.php?2,133814,133889#msg-133889 above).
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 01, 2024 11:31PM |
Admin Registered: 13 years ago Posts: 18,994 |
> RN102 0 0 0.000001 > 0.007872 0.019438 0.024168 0.034290 > 0.110959 0.117666 0.126529 0.134613 > 0.144256 0.151252 0.158862 2.054169 > 2.078575 2.089990 2.099139 2.120027 > 2.124320 2.160606 > Mirabox 0 0 0.000001 > 0.008585 0.021045 0.026200 0.037233 > 0.120039 0.127140 0.135209 0.143927 > 0.154436 0.162033 0.170095 2.080222 > 2.090034 2.111673 2.120682 2.141373 > 2.146034 2.178996 > Ratio NaN NaN 1.000000 > 0.916948 0.923640 0.922443 0.920957 > 0.924358 0.925484 0.935803 0.935287 > 0.934083 0.933464 0.933960 0.987476 > 0.994517 0.989732 0.989841 0.990032 > 0.989882 0.991560 >>
[ 0.000000] Switching to timer-based delay loop, resolution 53ns [ 0.000006] sched_clock: 32 bits at 19MHz, resolution 53ns, wraps every 114840871909ns (114.840871909 seconds) [ 0.008914] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 102208375848 ns (102.208 375 848 seconds) [ 0.043443] Calibrating delay loop (skipped), value calculated using timer frequency.. 37.39 BogoMIPS (lpj=186996) [ 0.364886] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns (19 112 604 462 750 000) [ 1.711262] PTP clock support registered [ 1.744423] clocksource: Switched to clocksource armada_370_xp_clocksource [ 15.772193] clk: Disabling unused clocks
[ 0.000000][ T0] Switching to timer-based delay loop, resolution 53ns [ 0.000007][ T0] sched_clock: 32 bits at 19MHz, resolution 53ns, wraps every 114537122277ns (114.537122277) [ 0.008271][ T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 101938038664 ns (101.938 038 664 seconds) [ 0.042877][ T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 37.49 BogoMIPS (lpj=187492) [ 0.416352][ T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns (19 112 604 462 750 000) [ 1.820829][ T1] PTP clock support registered [ 1.860976][ T1] clocksource: Switched to clocksource armada_370_xp_clocksource [ 25.819221][ T1] clk: Disabling unused clocks
[ 0.000000][ T0] Switching to timer-based delay loop, resolution 53ns [ 0.000001][ T0] sched_clock: 32 bits at 19MHz, resolution 53ns, wraps every 114537122277ns [ 0.007909][ T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 101938038664 ns [ 0.033032][ T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 37.49 BogoMIPS (lpj=187492) [ 0.179478][ T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 1.206872][ T1] PTP clock support registered [ 1.218084][ T1] clocksource: Switched to clocksource armada_370_xp_clocksource [ 4.265160][ T1] clk: Disabling unused clocks
[ 0.000006] sched_clock: 32 bits at 19MHz, resolution 53ns, wraps every 114840871909ns (114.840871909 seconds)
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 07, 2024 03:52PM |
Registered: 7 years ago Posts: 184 |
$ uname -a Linux rn102 6.9.6-mvebu-370xp-tld-2 #2 PREEMPT Wed Jul 3 17:10:27 PDT 2024 armv7l GNU/Linux
$ dmesg | grep -iE 'source|clock' [ 0.000001] sched_clock: 32 bits at 19MHz, resolution 53ns, wraps every 114537122277ns [ 0.007897] clocksource: armada_370_xp_clocksource: scale: 1 ns, freq: 18749237 [ 0.015211] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 101938038664 ns [ 0.141391] clocksource: jiffies: scale: 1 ns, freq: 0 [ 0.146750] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 1.173534] PTP clock support registered [ 1.184299] clocksource: Switched to clocksource armada_370_xp_clocksource [ 4.169352] clk: Disabling unused clocksStrangely, RN102 reports the wrong wrap time after only 1 us. The full log is attached.
$ ssh rn102 date; sleep 60; ssh rn102 date Sun 7 Jul 22:30:33 CEST 2024 Sun 7 Jul 22:31:28 CEST 2024The RN102 is lagging about 5 s per minute as before.
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 07, 2024 04:18PM |
Admin Registered: 13 years ago Posts: 18,994 |
[ 0.007897] clocksource: armada_370_xp_clocksource: scale: 1 ns, freq: 18,749,237My Mirabox dmesg
[ 0.008608] clocksource: armada_370_xp_clocksource: scale: 1 ns, freq: 18,699,646
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 07, 2024 04:43PM |
Admin Registered: 13 years ago Posts: 18,994 |
sched_clock_register(u64 (*read)(void), int bits, unsigned long rate) { u64 res, wrap, new_mask, new_epoch, cyc, ns; u32 new_mult, new_shift; unsigned long r, flags; char r_unit; struct clock_read_data rd; if (cd.rate > rate) return; /* Cannot register a sched_clock with interrupts on */ local_irq_save(flags); ..... .... pr_info("sched_clock: %u bits at %lu%cHz, resolution %lluns, wraps every %lluns\n", bits, r, r_unit, res, wrap); /* Enable IRQ time accounting if we have a fast enough sched_clock() */ if (irqtime > 0 || (irqtime == -1 && rate >= 1000000)) enable_sched_clock_irqtime(); local_irq_restore(flags); pr_debug("Registered %pS as sched_clock source\n", read);
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 08, 2024 01:11AM |
Registered: 7 years ago Posts: 184 |
octave:1> 55/60 ans = 0.9167 octave:2> 18749237/18699646 ans = 1.0027 octave:3> (1-55/60)/(1-18749237/18699646) ans = -31.423The observed lagging is 31 times larger than the difference in reported frequency, so there must be more to it than just the clock frequency.
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 08, 2024 02:45PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 08, 2024 03:40PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 08, 2024 10:45PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 09, 2024 12:24AM |
Registered: 9 years ago Posts: 461 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 09, 2024 02:30PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 09, 2024 08:27PM |
Registered: 9 years ago Posts: 461 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 10, 2024 11:01PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 11, 2024 07:44PM |
Registered: 9 years ago Posts: 461 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 16, 2024 01:35PM |
Registered: 7 years ago Posts: 184 |
Quote
bodhi
Wish we have GPL source for the RN102 u-boot so we can see what it does during boot.
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 16, 2024 02:12PM |
Admin Registered: 13 years ago Posts: 18,994 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 16, 2024 05:28PM |
Admin Registered: 13 years ago Posts: 18,994 |
md.l 0x18230 1 md.l 0x18234 1
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 17, 2024 07:34AM |
Registered: 7 years ago Posts: 184 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 17, 2024 08:14PM |
Registered: 9 years ago Posts: 461 |
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 23, 2024 04:44AM |
Registered: 7 years ago Posts: 184 |
Quote
Please cold start (after shutdown for about 30 minutes) your RN102 or RN104. Interrupt u-boot at count down and dump SAR register
Marvell>> md.l 0x18230 1 00018230: e12fff1e ../. Marvell>> md.l 0x18234 1 00018234: e3a00000 ....RN102 cold start:
Marvell>> md.l 0x18230 1 00018230: e12fff1e ../. Marvell>> md.l 0x18234 1 00018234: e3a00000 ....
Re: Time is lagging substantially on Netgear ReadyNAS RN102 and RN104 July 23, 2024 02:06PM |
Admin Registered: 13 years ago Posts: 18,994 |