[LEDE-DEV] [PATCH] ath9k: Add airtime fairness scheduler

Weedy weedy2887 at gmail.com
Sun Nov 27 03:08:31 PST 2016


On Fri, Nov 25, 2016 at 5:16 AM, Toke Høiland-Jørgensen <toke at toke.dk> wrote:
> This adds a patch that introduces airtime fairness scheduling to ath9k,
> which can significantly improve network efficiency in mixed-rate
> environments.
...
> ++      astats = &an->airtime_stats;
> ++
> ++      len += scnprintf(buf + len, size - len, "RX: %u us\n", astats->rx_airtime);
> ++      len += scnprintf(buf + len, size - len, "TX: %u us\n", astats->tx_airtime);
> ++      len += scnprintf(buf + len, size - len, "Deficit: ");
> ++      for (i = 0; i < 4; i++)
> ++              len += scnprintf(buf+len, size - len, "%s: %lld us ", qname[i], an->airtime_deficit[i]);
> ++      if (len < size)
> ++              buf[len++] = '\n';
> ++
> ++      retval = simple_read_from_buffer(user_buf, count, ppos, buf, len);
> ++      kfree(buf);
> ++
> ++      return retval;
> ++}

I'm supposed to have a
/sys/kernel/debug/ieee80211/phy0/netdev\:wlan0/stations/something/airtime
right?
Should I have done anything else besides:
# curl https://patchwork.ozlabs.org/patch/699159/raw/ | git apply -v
# make V=s package/mac80211/{clean,install}
Applying ./patches/326-ath9k-Introduce-airtime-fairness-scheduling.patch
using plaintext:
patching file drivers/net/wireless/ath/ath9k/ath9k.h
patching file drivers/net/wireless/ath/ath9k/channel.c
patching file drivers/net/wireless/ath/ath9k/debug.c
patching file drivers/net/wireless/ath/ath9k/debug.h
patching file drivers/net/wireless/ath/ath9k/debug_sta.c
patching file drivers/net/wireless/ath/ath9k/init.c
patching file drivers/net/wireless/ath/ath9k/main.c
patching file drivers/net/wireless/ath/ath9k/recv.c
patching file drivers/net/wireless/ath/ath9k/xmit.c

# <the rest of my install stuff>

Sat Nov 26 16:39:31 2016 kern.warn kernel: [   11.595812] PCI:
Enabling device 0000:00:11.0 (0000 -> 0002)
Sat Nov 26 16:39:31 2016 kern.info kernel: [   11.606388] ath: phy0:
Ignoring endianness difference in EEPROM magic bytes.
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.614943] ath: EEPROM
regdomain: 0x0
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.614952] ath: EEPROM
indicates default country code should be used
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.614960] ath: doing
EEPROM country->regdmn map search
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.614975] ath:
country maps to regdmn code: 0x3a
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.614985] ath:
Country alpha2 being used: US
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.614993] ath:
Regpair used: 0x3a
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.628327] ieee80211
phy0: Selected rate control algorithm 'minstrel_ht'
Sat Nov 26 16:39:31 2016 kern.info kernel: [   11.632241] ieee80211
phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=40
Sat Nov 26 16:39:31 2016 kern.warn kernel: [   11.697119] PCI:
Enabling device 0000:00:12.0 (0000 -> 0002)
Sat Nov 26 16:39:31 2016 kern.info kernel: [   11.707690] ath: phy1:
Ignoring endianness difference in EEPROM magic bytes.
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.716278] ath: EEPROM
regdomain: 0x0
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.716289] ath: EEPROM
indicates default country code should be used
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.716297] ath: doing
EEPROM country->regdmn map search
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.716313] ath:
country maps to regdmn code: 0x3a
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.716322] ath:
Country alpha2 being used: US
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.716330] ath:
Regpair used: 0x3a
Sat Nov 26 16:39:31 2016 kern.debug kernel: [   11.731825] ieee80211
phy1: Selected rate control algorithm 'minstrel_ht'
Sat Nov 26 16:39:31 2016 kern.info kernel: [   11.735844] ieee80211
phy1: Atheros AR9280 Rev:2 mem=0xb0010000, irq=41

I can't seem to tell if I have the patched driver loaded. Unless
rc_stats counts?
              best   ____________rate__________
________statistics________    ________last_______
______sum-of________
mode guard #  rate  [name   idx airtime  max_tp]  [avg(tp) avg(prob)
sd(prob)]  [prob.|retry|suc|att]  [#success | #attempts]



More information about the Lede-dev mailing list