Build for Netgear R7800

The versioning was clarified in master today. (see https://github.com/openwrt/openwrt/pull/2963 )

Now the ath10k-ct-firmware package is separate from the mainline ath10k-firmware package, so the version number can reflect the ath10k-ct-firmware date. Now it is "2020-04-24-2"

 OpenWrt SNAPSHOT, r13115-a882bfce05
 -----------------------------------------------------
root@router1:~# opkg list-installed | grep ath10k
ath10k-firmware-qca9984-ct - 2020-04-24-2
kmod-ath10k-ct - 5.4.35+2020-03-25-3d173a47-1
1 Like

ct-full-htt works better and more stable for me than the new 'diet' ct-htt firmware.

Any comment/issue with the cpufreq patch? Thanks hnyman

diff --git a/target/linux/ipq806x/patches-5.4/900-tweak-cpufreq-ondemand-governor.patch b/target/linux/ipq806x/patches-5.4/900-tweak-cpufreq-ondemand-governor.patch
new file mode 100644
index 0000000000..dbf617d3cb
--- /dev/null
+++ b/target/linux/ipq806x/patches-5.4/900-tweak-cpufreq-ondemand-governor.patch
@@ -0,0 +1,16 @@
+--- a/drivers/cpufreq/cpufreq_ondemand.c
++++ b/drivers/cpufreq/cpufreq_ondemand.c
+@@ -21,10 +21,10 @@
+ #include "cpufreq_ondemand.h"
+ 
+ /* On-demand governor macros */
+-#define DEF_FREQUENCY_UP_THRESHOLD		(80)
+-#define DEF_SAMPLING_DOWN_FACTOR		(1)
++#define DEF_FREQUENCY_UP_THRESHOLD		(60)
++#define DEF_SAMPLING_DOWN_FACTOR		(10)
+ #define MAX_SAMPLING_DOWN_FACTOR		(100000)
+-#define MICRO_FREQUENCY_UP_THRESHOLD		(95)
++#define MICRO_FREQUENCY_UP_THRESHOLD		(60)
+ #define MICRO_FREQUENCY_MIN_SAMPLE_RATE		(10000)
+ #define MIN_FREQUENCY_UP_THRESHOLD		(1)
+ #define MAX_FREQUENCY_UP_THRESHOLD		(100)

Nothing special really.
I have lately tested modifying the cpufreq-ondemand with a bit milder ramp-up trigger level (60%) than the 35% discussed in some forum threads. The Linux default 95% is very high and practically means that the router needs to be fully utilised before the CPU is ramped up.

From the bursty network traffic perspective, the samplingdown period is maybe even more important , so that the CPU frequency does not decrease too quickly before the next burst.

The Linux defaults are global across the CPUs, so the 95% and samplingdown is probably originally been thought from desktop computing perspective, where the CPU load remains more stable without being quite so bursty.

I have also been looking at the cake stats and testing network speed, and have noticed that sometimes cake gets stuck to mode where the latency remains at some 50-60 ms instead of my normal 20 ms under load. I have been wondering if that is somehow related to either CPU frequency changes and/or irqbalance stuff, so that cake initially calculates some parameter wrong and then gets stuck to it.

Two consecutive runs with irqbalance enabled:
R7800_wired_190_18_irq-2piececake

Second run, where latency gets stuck to 60 ms:
R7800_wired_190_18_irq-piececake

Ps. In general I get the same or better throughput and lower latency with simple/fq_codel than with cake, so I prefer fq_codel. It suits to my connectivity.
R7800_wired_190_18_irq-fqcodel

With fq_codel limits set to 190 Mbit / 18 Mbit, the flent speedtest realises 180 Mbit download and 16 Mbit upload with 18.5 ms latency. Good enough for me.

2 Likes

Are you using any packet overhead? ethernet 22 byte?

Is this your own ondemand patch for your builds or is it being made the default in the repo?

it's in hnyman's main.patch

1 Like

My own.
Means the same as

echo 60 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
1 Like

I've been doing something similar in /etc/rc.local but it's nice to see it will be in your builds by default:

echo ondemand > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpufreq/policy1/scaling_governor
echo 800000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
echo 800000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_min_freq
echo 75 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

FWIW, I like to keep mine at 800MHz min freq, I noticed that it constantly flip-flops 384-600-800 anyway and the temperature increase is not noticeable, maybe 1-2C. That seems to also make it more stable, without it I seem to get some random reboots, though that may be just pure coincidence, not scientific evidence.

Any easy way to tell which flavor it is using, e.g. htt, full-htt, ...?

They are named separately, just like earlier.
See for yourself:

I haven't bothered.

(I have started with a 9.6 kbit modem in the early 90s, then 28.8 and later 56 kbit, then later cable 10/1 Mbit, then cable 90/12, so the current 180/16 Mbit with 18 ms latency to another country under heavy load is good enough :wink: So I haven't tweaked for the last bit of speed.)

2 Likes

No need to change then. But just to elaborate for a fixed packet size you can easily make up for under-accounting the per-packet-overhead, by just setting the shaper-rate a tad lower (and vice versa you can counter too high a shaper rate with increased per-packet-overhead), but the very moment you add packets of different sizes to the mix (like voip packets that are often in the 200-300 Bytes range) things can get out off whack. By which I mean, the same shaper-rate/overhead combination that works great to control bufferblat for large packets can start to fail keeping too much data out of the under-managed and over-sized buffers of the network element that you want to take out of the latency equation with your shaper.
Tl;dr: Specifying per-packet-overhead >= the true per-packet-overhead does not help in getting more speed, but rather allows reliable bufferbloat control independent of the actual packet size distribution on the link.

That said, if it works, it works, and you set the policy of your network; I just wanted to add some rationale why one might want to fiddle with the overhead accounting.

2 Likes

The PR seems to be closed without being merged.

So what?
Devs push their own changes to git.openwrt.org that is the upstream master. GitHub for the main OpenWrt is just a nice way to submit PRs.

The commits are still there:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=shortlog

1 Like

Greetings!

Wondering if on this build, or openwrt in general on the r7800 supports eSATA port multiplier. I have a Port Multiplier aware enclosure, setting up an SMB service on the r7800.

according to dmesg:

[    5.266546] ahci 29000000.sata: flags: ncq sntf pm led clo only pmp pio slum part ccc apst 

the "pmp" flag i'm assuming is port multiplier, so i am assuming it is supported in the driver? I have tried multipler eSATA enclosures and only one drive is recognized, both on this build and snapshot.

on some other devices, as the WRT32X, it's an option in the kernel config, CONFIG_SATA_PMP=y , is this an option for the @hnyman build for our device?

thought I would ask to see if anyone else has run into this issue or had any thoughts! Thanks!

@hnyman

~# opkg update
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/targets/ipq806x/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/targets/ipq806x/generic/packages/Packages.sig
Failed to decode signature
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/base/Packages.sig
Failed to decode signature
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/luci/Packages.sig
Failed to decode signature
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/packages/Packages.sig
Failed to decode signature
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/routing/Packages.sig
Failed to decode signature
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/arm_cortex-a15_neon-vfpv4/telephony/Packages.sig
Failed to decode signature
Signature check failed.
Remove wrong Signature file.

~Unable to do opkg update not sure what's the issue here~

nvm... I did another reset that seems to have fixed the error

kmod-ata-core should be enabled which should be the same as CONFIG_SATA_PMP, I think.

@hnyman

Is there much performance difference between the 19.07 stable build and the snapshot builds? I assume most performance patches/tweaks are done to both, but how much difference is the new 5.4 kernel making to performance?

1 Like

Not much difference, I think.
Both are good enough for "normal use".

And generally, the new kernels have actually caused performance degradation, as new functionality and complexity is usually being added. E.g. kernel 4.4 a few years ago was much slower than 4.1 for many routers...
Read e.g.

1 Like

Thank you once again for your continued effort and support @hnyman