Thread (38 messages) 38 messages, 4 authors, 2018-09-13

Re: [PATCH RFC v3 1/4] mac80211: Add TXQ scheduling API

From: Toke Høiland-Jørgensen <toke@toke.dk>
Date: 2018-09-10 18:12:46

Johannes Berg [off-list ref] writes:
On Mon, 2018-09-10 at 15:08 +0200, Toke H=C3=B8iland-J=C3=B8rgensen wrote:
quoted
Johannes Berg [off-list ref] writes:
=20
quoted
On Mon, 2018-09-10 at 14:39 +0200, Toke H=C3=B8iland-J=C3=B8rgensen wr=
ote:
quoted
quoted
=20
quoted
quoted
From then on, right now we basically just try to refill the hardwa=
re
quoted
quoted
quoted
quoted
queue from the TXQ whenever the hardware releases frames from that
queue. If there are none, we fall back to putting them on the hard=
ware
quoted
quoted
quoted
quoted
queue from the wake signal.
=20
OK. So if the TXQ is ineligible to dequeue packets, but still have t=
hem
quoted
quoted
quoted
queued, there would need to be a signal (such as wake_txq()) when it
becomes eligible again, right?
=20
Right. It wouldn't have to be wake_txq, but that seems as appropriate =
as
quoted
quoted
anything else.
=20
If we were to use ieee80211_airtime_may_transmit(), we'd have to have
something that tells us "I previously told you it may not transmit, but
now I changed my mind" :-)
=20
Yes, exactly. Hmm, I'll see what I can come up with :)
No need to look at this right now - let's get this stuff sorted out
first :)
Right, sure, I'll get the port of ath9k done first; but doesn't hurt to
think about API compatibility with the other drivers at the same time as
well...

If we have the start_schedule() / end_schedule() pair anyway, the latter
could notify any TXQs that became eligible during the scheduling round.

Also, instead of having the three different API functions
(next_txq()/may_tx()/schedule_txq()), we could  have get_txq(txq)/put_txq(t=
xq)
which would always need to be paired; but the argument to get_txq()
could be optional, and if the driver passes NULL it means "give me the
next available TXQ".

So for ath9k it would be:


start_schedule(ac);
while ((txq =3D get_txq(NULL)) {
  queue_aggregate(txq);
  put_txq(txq);
}
end_schedule(ac);

And for ath10k/iwlwifi it would be:

on_hw_notify(txq) {
 start_schedule(ac);
 if (txq =3D get_txq(txq)) {
   queue_packets(txq);
   put_txq(txq);
 }
 end_schedule(ac);
}


I think that would be simpler, API-wise?

-Toke
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help