AQL and the ath10k is *lovely*

I do have that setting only on my gateway with an rpi4, all my other devices dont have it ! Example:
root@openwrt-c6v2:~# find /sys/|grep gov
root@openwrt-c6v2:~#

Hmmm I think that setting is only for ARM devices and not for MIPS.

PD: I used to have an Archer C60 V2 like 4 years ago but I remember OpenWrt used to be very slow on it also the 5GHz radio went bad some day.

Hi @dtaht ,

Do you happen to have a write up of some sort of those recommendations somewhere? I’d be very happy if it would be usable for OpenWRT. I understand that some of these settings might not be a simple setting that fits all situations for all clients out there. I’m willing to invest in getting some knowledge but where to start? Is there a quick & dirty route you’d advise?

Curious as to others experiences with this post 21.02?

1 Like

Did AQL make it in for 21.02? I didn't see it in the release notes, so I assume "post 21.02" refers to master builds, right?

AFAIK it didn't make it in time for 21.02. My experience with a cherry picked patch on top of 21.02 is that large ping spikes have been reduced, but I've been seeing an error in dmesg that I'll need to narrow down to possibly being from the AQL patch:

[694729.910501] ------------[ cut here ]------------
[694729.915465] WARNING: CPU: 0 PID: 0 at backports-5.10.42-1/net/mac80211/rate.c:677 ieee80211_get_tx_rates+0x69c/0x6d8 [mac80211]
[694729.927228] Modules linked in: ath9k ath9k_common pppoe ppp_async ath9k_hw ath10k_pci ath10k_core ath pppox ppp_generic mac80211 iptable_nat ipt_REJECT cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_MASQUERADE xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY slhc sch_cake nf_reject_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_conntrack_netlink nf_conncount iptable_raw iptable_mangle iptable_filter ipt_ECN ip_tables crc_ccitt compat sch_teql sch_sfq sch_red sch_prio sch_pie sch_multiq sch_gred sch_fq sch_dsmark sch_codel em_text em_nbyte em_meta em_cmp act_simple act_police act_pedit act_ipt act_csum libcrc32c em_ipset act_ctinfo act_connmark nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw
[694729.927398]  cls_flow cls_basic act_skbedit act_mirred act_gact ledtrig_usbport xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ifb md5 fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic crypto_hash
[694730.070989] CPU: 0 PID: 0 Comm: swapper Not tainted 5.4.128 #0
[694730.076999] Stack : 80690000 8062bcb8 00000000 00000000 8062ae7c 87c0bc84 80667180 80666d63
[694730.085575]         805c9d00 00000000 807c32d8 86d77d40 86fdc1a0 00000001 87c0bc38 9198bcd1
[694730.094148]         00000000 00000000 807f0000 000000f7 00000030 00000000 352e342e 31323820
[694730.102716]         000000f7 78a60564 00000000 73776170 00000000 00000009 00000000 86d1e960
[694730.111288]         00000009 86d77d40 86fdc1a0 80660000 00000002 80318018 00000000 807c0000
[694730.119858]         ...
[694730.122429] Call Trace:
[694730.125017] [<80069864>] show_stack+0x30/0x100
[694730.129619] [<8008270c>] __warn+0xc0/0x10c
[694730.133866] [<800827b4>] warn_slowpath_fmt+0x5c/0xac
[694730.139111] [<86d1e960>] ieee80211_get_tx_rates+0x69c/0x6d8 [mac80211]
[694730.145901] [<86fcc91c>] ath_tx_start+0x118/0x250 [ath9k]
[694730.151494] [<86fc4400>] ath9k_ps_restore+0x8c8/0xbe0 [ath9k]
[694730.157421] ---[ end trace 30e3bc2d8dda9f47 ]---
[694730.326513] ------------[ cut here ]------------

Subsequent occurrences have:

[694730.326513] ------------[ cut here ]------------
[694730.331466] WARNING: CPU: 0 PID: 0 at backports-5.10.42-1/net/mac80211/rate.c:677 ieee80211_get_tx_rates+0x69c/0x6d8 [mac80211]
[694730.343217] Modules linked in: ath9k ath9k_common pppoe ppp_async ath9k_hw ath10k_pci ath10k_core ath pppox ppp_generic mac80211 iptable_nat ipt_REJECT cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_MASQUERADE xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY slhc sch_cake nf_reject_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_conntrack_netlink nf_conncount iptable_raw iptable_mangle iptable_filter ipt_ECN ip_tables crc_ccitt compat sch_teql sch_sfq sch_red sch_prio sch_pie sch_multiq sch_gred sch_fq sch_dsmark sch_codel em_text em_nbyte em_meta em_cmp act_simple act_police act_pedit act_ipt act_csum libcrc32c em_ipset act_ctinfo act_connmark nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw
[694730.343389]  cls_flow cls_basic act_skbedit act_mirred act_gact ledtrig_usbport xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ifb md5 fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic crypto_hash
[694730.486985] CPU: 0 PID: 0 Comm: swapper Tainted: G        W         5.4.128 #0
[694730.494400] Stack : 80690000 8062bcb8 00000000 00000000 8062ae7c 87c0bc84 80667180 80666d63
[694730.502966]         805c9d00 00000000 807c32d8 86d77d40 86fdc1a0 00000001 87c0bc38 9198bcd1
[694730.511538]         00000000 00000000 807f0000 0000010a 00000030 00000000 20202020 20205720
[694730.520109]         0000010a ecdc985e 00000000 20202020 00000000 00000009 00000000 86d1e960
[694730.528680]         00000009 86d77d40 86fdc1a0 80660000 00000002 80318018 00000000 807c0000
[694730.537252]         ...
[694730.539816] Call Trace:
[694730.542402] [<80069864>] show_stack+0x30/0x100
[694730.547003] [<8008270c>] __warn+0xc0/0x10c
[694730.551250] [<800827b4>] warn_slowpath_fmt+0x5c/0xac
[694730.556492] [<86d1e960>] ieee80211_get_tx_rates+0x69c/0x6d8 [mac80211]
[694730.563284] [<86fcc91c>] ath_tx_start+0x118/0x250 [ath9k]
[694730.568878] [<86fc4400>] ath9k_ps_restore+0x8c8/0xbe0 [ath9k]
[694730.574806] ---[ end trace 30e3bc2d8dda9f48 ]---
[694730.757050] ------------[ cut here ]------------

I'm not sure why it says tainted in all subsequent traces.

I am sorry to hear it didn't make it. I had too many conflicts of work to be able to work on it more. I have finally got some spare time coming up.

I am not a Dev, but I think 21.02 git branch was branched in Feb 2021. I think the commit(s) might have made it into the 21.02.0 release. Do we know which the specific commit(s) (ids) are related to AQL?

I believe the interesting commit is this one:

commit ea5078014d3f8a6f662e41cf9dec23028ca303e3
Author: Felix Fietkau <nbd@nbd.name>
Date:   2020-01-18 18:44:00 +0100

    mac80211: backport airtime queue limits support

That was well before the 21.02 branch was created:

> git branch -r --contains ea5078014d3f8a6f662e41cf9dec23028ca303e3
origin/HEAD -> origin/master
origin/master
origin/openwrt-21.02

Try looking at a5888ad6b33840d913438ce664c0e7da7e7f53e6.

"mac80211: merge the virtual time based airtime scheduler

Improves airtime fairness, especially for devices with larger firmware buffers"

Pretty sure it made it.
21.02 has 5.10.68 backport and ath10k-ct from 5.10

I did a search for "airtime" and "aql" in the git repo https://git.openwrt.org/?p=openwrt%2Fopenwrt.git&a=search&h=refs%2Fheads%2Fopenwrt-21.02&st=commit&s=airtime and came across what I think are the relevant commits that are in 21.02 branch:

  1. https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=ea5078014d3f8a6f662e41cf9dec23028ca303e3
  2. https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=5c57d15aed3ed7fd5ed077833044660df52c1bf4
  3. https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=b7727a8005635a46255518bdf19eb016e160278a
  4. https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=431fb8cae97355109e2496c5921b6d91ce9d510b
  5. https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=2c14710c54befc69e70fff52240875b2bbf94cd1

The following commit is only in "master" branch and not in 21.02 branch:

  1. https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=a5888ad6b33840d913438ce664c0e7da7e7f53e6

Thank you for tracking this down! I guess I'll try 21.02 out tomorrow. It's a shame it wasn't mentioned in any release notes. It should be a huge feature for some users.

It sounds like the current release has AQL based on round robin sending bytes, but not virtual airtime fairness of how long those bytes take to send. I'd love to hear a proper summary.

1 Like

I notice that the above happened on Sep 22th, when "official release" was on the 1st-2nd of Sep? Dosen't that mean it's not in there if you go download the standard release version? Pardon me if my newbness is showing...

If the above is true, how does one go about getting a version that has the post release items merged?

Nightly snapshots have all the latest code.

it's already there before the official release.
Check the commit story of mac80211

Hi all, Is there a difference in latency performance between kmod-ath10k-ct-smallbuffers and kmod-ath10k-ct drivers in Netgear R7800? I am currently using the -smallbuffers driver but not sure if that is better or worse than the normal kmod-ath10k-ct driver, when it comes to latency/AQL. I went through this thread but could not find a clear answer.

1 Like

small buffer is made for device that has small RAM.
You don't need it on R7800

How much RAM is considered small RAM? R7800 has only total of 512 MB RAM.

according to the commit message
these two are considered small:
64MB for one ath10k chip
128MB for two