Peter Oh <peter.oh@xxxxxxxx> writes: > On 9/19/19 10:46 AM, Ben Greear wrote: >> On 9/19/19 10:44 AM, Peter Oh wrote: >>> On 9/19/19 5:22 AM, Toke Høiland-Jørgensen wrote: >>>> From: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> >>>> >>>> This patch ports that idea over to mac80211. The basic idea is simple >>>> enough: Whenever we dequeue a packet from the TXQs and send it to the >>>> driver, we estimate its airtime usage, based on the last recorded TX >>>> rate >>>> of the station that packet is destined for. >>> >>> The way to decide the last recorded TX rate could be vary among >>> drivers. In terms of ath10k driver and FW, they use 4 PPDUs to update >>> the Tx rate. Isn't it too small sampling number to be used for AQL? >> >> Probably it is not exactly the last 4 either, since the report comes >> back indirectly and not >> synchronized with the tx path? >> > The point of my question is "the last recorded Tx raith small nte is > derived wumber of PPDUs and if it's ok to use it for AQL calculation > or not". We're leaving a bit of slack in the system by limiting the buffering to two aggregates' worth of buffering instead of just one. This is to prevent starvation in case our estimate is off. In the other direction, (i.e., if the rate drops suddenly), that will translate to more bloat until the queue drains. Not much we can do about that; we can only work with the data we have... Still, the Google guys reported pretty good results using this method for ath10k with their out of tree patch. So I think that in many cases, doing this will be an improvement; obviously, it won't be perfect. But it beats the 1000 pkt+ queue limit currently in (some versions of) ath10k firmware. In an ideal world, the firmware would enforce this minimum queueing and throttle itself, but, well, sadly we don't live an ideal world... -Toke