Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-09 Thread Toke Høiland-Jørgensen
Kan Yan writes: > It is most likely just insufficient locking. active_txq_lock is per > AC, can't protect local->aql_total_pending_airtime against racing > conditions: > void ieee80211_sta_update_pending_airtime(...) > { > spin_lock_bh(>active_txq_lock[ac]); > ... >

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Kan Yan
It is most likely just insufficient locking. active_txq_lock is per AC, can't protect local->aql_total_pending_airtime against racing conditions: void ieee80211_sta_update_pending_airtime(...) { spin_lock_bh(>active_txq_lock[ac]); ... local->aql_total_pending_airtime -=

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Johannes Berg
On Fri, 2019-11-08 at 12:10 +0100, Toke Høiland-Jørgensen wrote: > Right, bugger. I was thinking maybe there's a case where skbs can be > cloned (and retain the tx_time_est field) and then released twice? They could be cloned, but I don't see how that'd be while *inside* the stack and then they

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Fri, 2019-11-08 at 11:56 +0100, Toke Høiland-Jørgensen wrote: >> Johannes Berg writes: >> >> > On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: >> > > >> > > +void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, >> > > +

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Johannes Berg
On Fri, 2019-11-08 at 11:56 +0100, Toke Høiland-Jørgensen wrote: > Johannes Berg writes: > > > On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: > > > > > > +void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, > > > + struct

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: >> >> >> +void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, >> + struct sta_info *sta, u8 ac, >> + u16

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Johannes Berg
On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: > > > +void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, > + struct sta_info *sta, u8 ac, > + u16 tx_airtime, bool tx_completed) >

[PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-10-23 Thread Toke Høiland-Jørgensen
From: Kan Yan In order for the Fq_CoDel algorithm integrated in mac80211 layer to operate effectively to control excessive queueing latency, the CoDel algorithm requires an accurate measure of how long packets stays in the queue, AKA sojourn time. The sojourn time measured at the mac80211 layer