Skip to contentSkip to conversation

minstrel_ht: new rate control module for 802.11n

RFC In review Felix Fietkau 2 participants 3 messages Mar 7, 2010 – Mar 8, 2010 mac80211

lore
Share & tools
lore
#0 lore raw

RFC v3 1/1 minstrel_ht: new rate control module for 802.11n

Here's v3 of minstrel_ht.

Changelog:

v3:
- Add two fixes by Christian Lamparter (division by zero, debugfs mcs rate display)
- Improve throughput a bit more by spreading out slow rate sampling attempts over multiple sampling intervals

v2:
- Use accurate A-MPDU statistics from tx feedback
- Rewrite the sampling algorithm to optimize for good A-MPDU lengths and faster throughput recovery
- Implement .rate_update to handle changes in HT capabilities or channel bandwidth
- Remove the private tx flags hack

---

net/mac80211/Makefile +2 -2
@@ -47,8 +47,8 @@ CFLAGS_driver-trace.o := -I$(src)
 rc80211_pid-y := rc80211_pid_algo.o
 rc80211_pid-$(CONFIG_MAC80211_DEBUGFS) += rc80211_pid_debugfs.o
 
-rc80211_minstrel-y := rc80211_minstrel.o
-rc80211_minstrel-$(CONFIG_MAC80211_DEBUGFS) += rc80211_minstrel_debugfs.o
+rc80211_minstrel-y := rc80211_minstrel.o rc80211_minstrel_ht.o
+rc80211_minstrel-$(CONFIG_MAC80211_DEBUGFS) += rc80211_minstrel_debugfs.o rc80211_minstrel_ht_debugfs.o
 
 mac80211-$(CONFIG_MAC80211_RC_PID) += $(rc80211_pid-y)
 mac80211-$(CONFIG_MAC80211_RC_MINSTREL) += $(rc80211_minstrel-y)
net/mac80211/main.c +7 -0
@@ -714,6 +714,10 @@ static int __init ieee80211_init(void)
 	if (ret)
 		return ret;
 
+	ret = rc80211_minstrel_ht_init();
+	if (ret)
+		goto err_minstrel;
+
 	ret = rc80211_pid_init();
 	if (ret)
 		goto err_pid;
@@ -726,6 +730,8 @@ static int __init ieee80211_init(void)
  err_netdev:
 	rc80211_pid_exit();
  err_pid:
+	rc80211_minstrel_ht_exit();
+ err_minstrel:
 	rc80211_minstrel_exit();
 
 	return ret;
@@ -734,6 +740,7 @@ static int __init ieee80211_init(void)
 static void __exit ieee80211_exit(void)
 {
 	rc80211_pid_exit();
+	rc80211_minstrel_ht_exit();
 	rc80211_minstrel_exit();
 
 	/*
net/mac80211/rate.h +9 -0
@@ -137,6 +137,8 @@ static inline void rc80211_pid_exit(void
 #ifdef CONFIG_MAC80211_RC_MINSTREL
 extern int rc80211_minstrel_init(void);
 extern void rc80211_minstrel_exit(void);
+extern int rc80211_minstrel_ht_init(void);
+extern void rc80211_minstrel_ht_exit(void);
 #else
 static inline int rc80211_minstrel_init(void)
 {
@@ -145,6 +147,13 @@ static inline int rc80211_minstrel_init(
 static inline void rc80211_minstrel_exit(void)
 {
 }
+static inline int rc80211_minstrel_ht_init(void)
+{
+	return 0;
+}
+static inline void rc80211_minstrel_ht_exit(void)
+{
+}
 #endif
 
 
net/mac80211/rc80211_minstrel_ht.c new file +809 -0

809 lines not on this page · raw message

net/mac80211/rc80211_minstrel_ht.h new file +121 -0

121 lines not on this page · raw message

net/mac80211/rc80211_minstrel_ht_debugfs.c new file +120 -0

120 lines not on this page · raw message

#1 lore raw

Hi Felix, thanks for the awesome patch and great progress on the 802.11n! I just tried out your patch version 3, and got the following results.

The results are an average of 10 different iperf runs, Throughputs are in Mbits/sec
AP: dir-615 (settings: 802.11n mode only, Auto 20/40 Mhz). This AP does not seem to allow me to set 40Mhz only
Node interfaces: D-Link DWA-556 Xtreme N PC

scenario 1: node 1 to node 2

node1-----wireless_link-----AP-----wireless_link-----node2

802.11n Felix's Minstrel Avg Transfer= 38.6 Avg Bandwidth=32.3
802.11n Atheros Default Avg Transfer= 36.6 Avg Bandwidth=30.6

scenario 2: node 1 to node 2

node1-----wireless_link-----AP-----wired_link-----node2

802.11n Felix's Minstrel Avg Transfer= 83.4 Avg Bandwidth=69.8
802.11n Atheros Default Avg Transfer= 95.2 Avg Bandwidth=79.8

Overall, the results look pretty good. I am much more interested in results in scenario 1 but I am going to take a look at scenario 2 again. Let me know if I can help you test any other scenarios.

Duy

Quoted 17 lines · Felix Fietkau

Here's v3 of minstrel_ht.

Changelog:

v3:
- Add two fixes by Christian Lamparter (division by zero, debugfs mcs rate display)
- Improve throughput a bit more by spreading out slow rate sampling attempts over multiple sampling intervals

v2:
- Use accurate A-MPDU statistics from tx feedback
- Rewrite the sampling algorithm to optimize for good A-MPDU lengths and faster throughput recovery
- Implement .rate_update to handle changes in HT capabilities or channel bandwidth
- Remove the private tx flags hack

#2 lore raw

After many more runs on scenario 2, it is on par with atheros default.
Sorry for the earlier hasty reporting.

scenario 2: node 1 to node 2

802.11n Felix's Minstrel Avg Transfer= 95.5 Avg Bandwidth=80.11
802.11n Atheros Default Avg Transfer= 95.2 Avg Bandwidth=79.8

Quoted 51 lines · Duy Nguyen

Hi Felix, thanks for the awesome patch and great progress on the 802.11n!  I just tried out your patch version 3, and got the following results.

The results are an average of 10 different iperf runs, Throughputs are in Mbits/sec
AP: dir-615 (settings: 802.11n mode only, Auto 20/40 Mhz).  This AP does not seem to allow me to set 40Mhz only
Node interfaces:  D-Link DWA-556 Xtreme N PC

scenario 1: node 1 to node 2

node1-----wireless_link-----AP-----wireless_link-----node2

802.11n Felix's Minstrel    Avg Transfer= 38.6  Avg Bandwidth=32.3 802.11n Atheros Default    Avg Transfer= 36.6  Avg Bandwidth=30.6

scenario 2: node 1 to node 2

node1-----wireless_link-----AP-----wired_link-----node2

802.11n Felix's Minstrel    Avg Transfer= 83.4  Avg Bandwidth=69.8 802.11n Atheros Default    Avg Transfer= 95.2  Avg Bandwidth=79.8

Overall, the results look pretty good.  I am much more interested in results in scenario 1 but I am going to take a look at scenario 2 again.  Let me know if I can help you test any other scenarios.

Duy

Quoted 17 lines · Felix Fietkau

Here's v3 of minstrel_ht.

Changelog:

v3:
- Add two fixes by Christian Lamparter (division by zero, debugfs mcs rate display)
- Improve throughput a bit more by spreading out slow rate sampling attempts over multiple sampling intervals

v2:
- Use accurate A-MPDU statistics from tx feedback
- Rewrite the sampling algorithm to optimize for good A-MPDU lengths and faster throughput recovery
- Implement .rate_update to handle changes in HT capabilities or channel bandwidth
- Remove the private tx flags hack