[PATCH] mac80211: only schedule TXQ when reasonable airtime reporting

Ryder Lee ryder.lee at mediatek.com
Mon Feb 8 09:53:53 EST 2021


On Sun, 2021-02-07 at 10:41 +0800, Ryder Lee wrote:
> On Fri, 2021-02-05 at 14:29 +0100, Toke Høiland-Jørgensen wrote:

> > > @@ -3770,6 +3770,10 @@ struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
> > >  				sta->airtime_weight;
> > >  
> > >  		if (deficit < 0 || !aql_check) {
> > > +			if (txqi->schedule_round == local->schedule_round[ac])
> > > +				goto out;
> > > +
> > > +			txqi->schedule_round = local->schedule_round[ac];
> > 
> > I think this change may be worth making anyway, but for a different
> > reason: Without it, a station that fails aql_check will keep getting
> > recycled through the list, advancing its deficit. Which could actually
> > be the reason AQL breaks airtime fairness; did you observe any
> > difference in fairness with this change?
> 
> Our case is: mt7915 provides per-peer airtime counters. However, some of
> them were not properly configured, so certain stations reported large
> amount of airtime which led to deficit < 0, and as you said, ending up
> with recycle + very longer lock hold time (0.9s in our tests) and
> breaking fairness.
> 
> 
Found a problem when we are in low traffic with this patch.This will
increase latency (i.e ping)


So, we have to

	if (deficit < 0 || !aql_check) {
		if (txqi->schedule_round == local->schedule_round[ac])
			// re-schedule
			goto out;
			....
	}
}

if (txqi->schedule_round == local->schedule_round[ac])
	// re-schedule
	goto out;

Ryder


More information about the Linux-mediatek mailing list