Re: [Cerowrt-devel] [Make-wifi-fast] AREDN and Make Wifi Fast

2016-02-26 Thread David Lang

On Sat, 6 Feb 2016, Dave Täht wrote:


Email lists themselves seem to have become passe' - the "discourse"
engine seems like a good idea - but I LIKE email.


Some people like e-mail, some like web forums.

You can combine them and let people use whichever interface to the message 
stream that they want.


David Lang___
Cerowrt-devel mailing list
Cerowrt-devel@lists.bufferbloat.net
https://lists.bufferbloat.net/listinfo/cerowrt-devel


[Cerowrt-devel] Fwd: [RFC/RFT] mac80211: implement fq_codel for software queuing

2016-02-26 Thread Dave Taht
Michal made my morning. Still, we need to get setup to sanely test
this stuff comprehensively.


-- Forwarded message --
From: Michal Kazior 
Date: Fri, Feb 26, 2016 at 5:09 AM
Subject: [RFC/RFT] mac80211: implement fq_codel for software queuing
To: linux-wirel...@vger.kernel.org
Cc: johan...@sipsolutions.net, net...@vger.kernel.org,
eric.duma...@gmail.com, dave.t...@gmail.com,
emmanuel.grumb...@intel.com, n...@openwrt.org, Tim Shepard
, Michal Kazior 


Since 11n aggregation become important to get the
best out of txops. However aggregation inherently
requires buffering and queuing. Once variable
medium conditions to different associated stations
is considered it became apparent that bufferbloat
can't be simply fought with qdiscs for wireless
drivers. 11ac with MU-MIMO makes the problem
worse because the bandwidth-delay product becomes
even greater.

This bases on codel5 and sch_fq_codel.c. It may
not be the Right Thing yet but it should at least
provide a framework for more improvements.

I guess dropping rate could factor in per-station
rate control info but I don't know how this should
exactly be done. HW rate control drivers would
need extra work to take advantage of this.

This obviously works only with drivers that use
wake_tx_queue op.

Note: This uses IFF_NO_QUEUE to get rid of qdiscs
for wireless drivers that use mac80211 and
implement wake_tx_queue op.

Moreover the current txq_limit and latency setting
might need tweaking. Either from userspace or be
dynamically scaled with regard to, e.g. number of
associated stations.

FWIW This already works nicely with ath10k's (not
yey merged) pull-push congestion control for
MU-MIMO as far as throughput is concerned.

Evaluating latency improvements is a little tricky
at this point if a driver is using more queue
layering and/or its firmware controls tx
scheduling - hence I don't have any solid data on
this. I'm open for suggestions though.

It might also be a good idea to do the following
in the future:

 - make generic tx scheduling which does some RR
   over per-sta-tid queues and dequeues bursts of
   packets to form a PPDU to fit into designated
   txop timeframe and bytelimit

   This could in theory be shared and used by
   ath9k and (future) mt76.

   Moreover tx scheduling could factor in rate
   control info and keep per-station number of
   queued packets at a sufficient low threshold to
   avoid queue buildup for slow stations. Emmanuel
   already did similar experiment for iwlwifi's
   station mode and got promising results.

 - make software queueing default internally in
   mac80211. This could help other drivers to get
   at least some benefit from mac80211 smarter
   queueing.

Signed-off-by: Michal Kazior 
---
 include/net/mac80211.h |  36 -
 net/mac80211/agg-tx.c  |   8 +-
 net/mac80211/codel.h   | 260 +++
 net/mac80211/codel_i.h |  89 +++
 net/mac80211/ieee80211_i.h |  27 +++-
 net/mac80211/iface.c   |  25 ++-
 net/mac80211/main.c|   9 +-
 net/mac80211/rx.c  |   2 +-
 net/mac80211/sta_info.c|  10 +-
 net/mac80211/sta_info.h|  27 
 net/mac80211/tx.c  | 370 -
 net/mac80211/util.c|  20 ++-
 12 files changed, 805 insertions(+), 78 deletions(-)
 create mode 100644 net/mac80211/codel.h
 create mode 100644 net/mac80211/codel_i.h

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 6617516a276f..4667d2bad356 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -565,6 +565,18 @@ struct ieee80211_bss_conf {
struct ieee80211_p2p_noa_attr p2p_noa_attr;
 };

+typedef u64 codel_time_t;
+
+/*
+ * struct codel_params - contains codel parameters
+ * @interval:  initial drop rate
+ * @target: maximum persistent sojourn time
+ */
+struct codel_params {
+   codel_time_tinterval;
+   codel_time_ttarget;
+};
+
 /**
  * enum mac80211_tx_info_flags - flags to describe transmission
information/status
  *
@@ -886,8 +898,18 @@ struct ieee80211_tx_info {
/* only needed before rate control */
unsigned long jiffies;
};
-   /* NB: vif can be NULL for injected frames */
-   struct ieee80211_vif *vif;
+   union {
+   /* NB: vif can be NULL for injected frames */
+   struct ieee80211_vif *vif;
+
+   /* When packets are enqueued on txq it's easy
+* to re-construct the vif pointer. There's no
+* more space in tx_info so it can be used to
+* store the necessary enqueue time for packet
+* sojourn time