From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2.tohojo.dk (mail2.tohojo.dk [77.235.48.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 3AE0E3B25E; Wed, 10 Aug 2016 18:07:32 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail2.tohojo.dk DKIM-Filter: OpenDKIM Filter v2.10.3 mail2.tohojo.dk 7012640D5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=201310; t=1470866850; bh=qI3QktasE8jF/PBOPypEqbiAFaIAulNuYkXwx5mUB6s=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=IHKsmAtV4H5hYiLlbyTCPGrj79tE1DuptqBdAKnwTxB/Q3g00CvzAJA+Drsq+T+ag wzJI+3M+Gjbp75MG1ewvzzqrm/FSOPJppoYhy8A+++3ZKs55hsOihJe+uf/tr0msUv fZ46fssmzEt7dVQx+Z47Kqb4PJ+QDXzbMa81D2m4= Received: by alrua-kau.kau.toke.dk (Postfix, from userid 1000) id 83586C40230; Thu, 11 Aug 2016 00:07:29 +0200 (CEST) From: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Dave Taht Cc: make-wifi-fast@lists.bufferbloat.net, "cerowrt-devel\@lists.bufferbloat.net" , Felix Fietkau References: <76eb6a6a-2f39-3b36-d4c1-04198083c0f6@gmail.com> <87oa50acnr.fsf@toke.dk> <87bn109tv8.fsf@toke.dk> <877fbo9t4v.fsf@toke.dk> Date: Thu, 11 Aug 2016 00:07:29 +0200 In-Reply-To: <877fbo9t4v.fsf@toke.dk> ("Toke =?utf-8?Q?H=C3=B8iland-J?= =?utf-8?Q?=C3=B8rgensen=22's?= message of "Thu, 11 Aug 2016 00:05:52 +0200") X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87bn10th0e.fsf@toke.dk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: Re: [Make-wifi-fast] wifi airtime fairness patches could use eyeballs and testing X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 22:07:32 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Toke H=C3=B8iland-J=C3=B8rgensen writes: > Dave Taht writes: > >> On Wed, Aug 10, 2016 at 11:50 PM, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >>> Toke H=C3=B8iland-J=C3=B8rgensen writes: >>> >>>> On 10 August 2016 21:35:40 CEST, Dave Taht wrote: >>>>>Wow, that *is* weird. It is good to see the tcp window changing on >>>>>this set of data (it wasn't before), and CWRs, but... hmmm... SCIENCE. >>>>> >>>>>Enabling ecn on both sides will rule out some potential bugs. >>>> >>>> Yeah, couldn't get ecn to work on the host I was using as the other en= dpoint on >>>> that test. Will try with another box that's not on quite as ancient a = kernel. >>>> Was also planning to disable codel (by setting a very high target) to = try to >>>> narrow down the problem. >>> >>> OK, digging some more on this: >>> >>> I am seeing *no* drops by CoDel, and no backlog in the mac80211 softq >>> layer either (or at most one or two packets when polling with a 1 sec >>> interval). This is with one as well as with two flows. >> >> But there are tons of drops evident from the captures. > > Well the CoDel drop counter stays completely flat. There are cwnd > reductions, yes, but are they drops? My thought was that they were > retransmissions caused by OOO packets? Here's the patch to expose the CoDel drop counter per flow, BTW. Can be dropped into a LEDE build. -Toke --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=341-mac80211-Keep-CoDel-stats-per-txq-export-them-in-deb.patch Content-Transfer-Encoding: quoted-printable >From d5a40556aa16fe0f452fd2ee975d7adce6f54837 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Toke=3D20H=3DC3=3DB8iland-J=3DC3=3DB8rgensen?=3D Date: Wed, 20 Jul 2016 16:06:49 +0200 Subject: [PATCH] mac80211: Keep CoDel stats per txq, export them in debugfs. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Currently the 'aqm' stats in mac80211 only keeps overlimit drop stats, not CoDel stats. This moves the CoDel stats into the txqi structure and adds the drop and mark counts to the debug output. Cc: Michal Kazior Signed-off-by: Toke H=C3=B8iland-J=C3=B8rgensen --- net/mac80211/debugfs.c | 12 ++++++++---- net/mac80211/ieee80211_i.h | 2 +- net/mac80211/tx.c | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 27e6fb9..69bf2e5 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c @@ -137,18 +137,20 @@ static int aqm_open(struct inode *inode, struct file = *file) len +=3D scnprintf(info->buf + len, info->size - len, "* vif\n" - "ifname addr ac backlog-bytes backlog-packets flows overlimit collisio= ns tx-bytes tx-packets\n"); + "ifname addr ac backlog-bytes backlog-packets flows drops marks overli= mit collisions tx-bytes tx-packets\n"); =20 list_for_each_entry_rcu(sdata, &local->interfaces, list) { txqi =3D to_txq_info(sdata->vif.txq); len +=3D scnprintf(info->buf + len, info->size - len, - "%s %pM %u %u %u %u %u %u %u %u\n", + "%s %pM %u %u %u %u %u %u %u %u %u %u\n", sdata->name, sdata->vif.addr, txqi->txq.ac, txqi->tin.backlog_bytes, txqi->tin.backlog_packets, txqi->tin.flows, + txqi->cstats.drop_count, + txqi->cstats.ecn_mark, txqi->tin.overlimit, txqi->tin.collisions, txqi->tin.tx_bytes, @@ -158,14 +160,14 @@ static int aqm_open(struct inode *inode, struct file = *file) len +=3D scnprintf(info->buf + len, info->size - len, "* sta\n" - "ifname addr tid ac backlog-bytes backlog-packets flows overlimit coll= isions tx-bytes tx-packets\n"); + "ifname addr tid ac backlog-bytes backlog-packets flows drops marks ov= erlimit collisions tx-bytes tx-packets\n"); =20 list_for_each_entry_rcu(sta, &local->sta_list, list) { sdata =3D sta->sdata; for (i =3D 0; i < ARRAY_SIZE(sta->sta.txq); i++) { txqi =3D to_txq_info(sta->sta.txq[i]); len +=3D scnprintf(info->buf + len, info->size - len, - "%s %pM %d %d %u %u %u %u %u %u %u\n", + "%s %pM %d %d %u %u %u %u %u %u %u %u %u\n", sdata->name, sta->sta.addr, txqi->txq.tid, @@ -173,6 +175,8 @@ static int aqm_open(struct inode *inode, struct file *f= ile) txqi->tin.backlog_bytes, txqi->tin.backlog_packets, txqi->tin.flows, + txqi->cstats.drop_count, + txqi->cstats.ecn_mark, txqi->tin.overlimit, txqi->tin.collisions, txqi->tin.tx_bytes, diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index c9f8c80..9f11b13 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -812,6 +812,7 @@ struct txq_info { struct fq_tin tin; struct fq_flow def_flow; struct codel_vars def_cvars; + struct codel_stats cstats; unsigned long flags; =20 /* keep last! */ @@ -1106,7 +1107,6 @@ struct ieee80211_local { struct fq fq; struct codel_vars *cvars; struct codel_params cparams; - struct codel_stats cstats; =20 const struct ieee80211_ops *ops; =20 diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 682011e..201167d 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1339,7 +1339,7 @@ static struct sk_buff *fq_tin_dequeue_func(struct fq = *fq, local =3D container_of(fq, struct ieee80211_local, fq); txqi =3D container_of(tin, struct txq_info, tin); cparams =3D &local->cparams; - cstats =3D &local->cstats; + cstats =3D &txqi->cstats; =20 if (flow =3D=3D &txqi->def_flow) cvars =3D &txqi->def_cvars; @@ -1399,6 +1399,7 @@ void ieee80211_txq_init(struct ieee80211_sub_if_data = *sdata, fq_tin_init(&txqi->tin); fq_flow_init(&txqi->def_flow); codel_vars_init(&txqi->def_cvars); + codel_stats_init(&txqi->cstats); =20 txqi->txq.vif =3D &sdata->vif; =20 @@ -1437,7 +1438,6 @@ int ieee80211_txq_setup_flows(struct ieee80211_local = *local) return ret; =20 codel_params_init(&local->cparams); - codel_stats_init(&local->cstats); local->cparams.interval =3D MS2TIME(100); local->cparams.target =3D MS2TIME(20); local->cparams.ecn =3D true; --=20 2.9.0 --=-=-=--