[Make-wifi-fast] [PATCH RFC/RFT 4/4] mac80211: Apply Airtime-based Queue Limit (AQL) on packet dequeue

Toke Høiland-Jørgensen toke at redhat.com
Sun Sep 29 15:18:24 EDT 2019


Kan Yan <kyan at google.com> writes:

>> No, ath10k would continue to do what it was always doing. Drivers that
>> can report after-the-fact airtime usage per-frame (like ath9k) will
>> continue to do that. In both of those cases, the airtime estimate is
>> only used to throttle the queue, not to schedule for fairness.
> You are right, I didn't realize ath9k reports per frame airtime usage.
>
>> Yeah, I was wondering about that. Makes sense. Why 24ms, exactly?
> The per interface 24 ms queue limit is an empirical number that works
> well for both achieve low latency when there is a lot of stations and
> get high throughput when there is only 1-2 stations.  We could make it
> configurable.

Right. "Found by trial and error" is a fine answer as far as I'm
concerned :)

But yeah, this should probably be configurable, like BQL is.

>> BTW, I think Felix' concern about powersave was in relation to AQL: If
>> we don't handle power save in that, we can end up in a situation where
>>the budget for packets allowed to be queued in the firmware is taken up
>> entirely by stations that are currently in powersave mode; which would
>> throttle the device completely. So we should take that into account for
>> AQL; for the fairness scheduler, stations in powersave are already
>> unscheduled, so that should be fine.
> I think the accounting for the airtime of frames in the power saving
> queue could affect both the fairness scheduler and AQL.
> For chipset with firmware offload, PS handling is mostly done by
> firmware, so host driver's knowledge of PS state could be slightly
> out-of-dated. The power save behavior also make it harder to the
> airtime_weight correct for the fairness scheduler.

Hmm, maybe. I'm not sure how significant this effect would be, but I
guess we'll need to find out :)


> Powersave mode's impact to AQL is much smaller. The lower per station
> queue limit is not impacted by other stations PS behavior, since the
> estimated future airtime is not weighted for other stations and a
> station won't get blocked due to others stations in PS mode.
> Station in PS mode do affects AQL's higher per interface limit, but in
> an inconsequential way. The per interface AQL queue limit is quite
> large (24 ms), hence airtime from packets in PS queue is unlikely to
> have a significant impact on it. Still, it will be better if the
> packet in power saving queue can be taken into account.

I guess the risk is lower when with a 24ms per-iface limit; but with
enough stations I guess it could still happen, no? So we should probably
handle this case...

>> > make it easier to schedule multiple stations, I think it has some merit
>> > that makes it worth trying out. We should probably get the AQL stuff
>> > done first, though, and try the virtual time scheduler on top of that.
>> Agree that we should get the AQL stuff done first since I believe it
>> will help to fix the issue mentioned above.
> That sounds like a good plan. The virtual time scheduler is more
> involved and will take more work to get it right. It make sense to get
> AQL done first.

Cool. Are you going to submit a ported version of your implementation?
Then we can work from the two submissions and see if we can't converge
on something...

-Toke



More information about the Make-wifi-fast mailing list