From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Niklas Cassel <niklas.cassel@linaro.org>
Cc: johannes@sipsolutions.net, kvalo@qca.qualcomm.com,
erik.stromdahl@gmail.com, Felix Fietkau <nbd@nbd.name>,
linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: ath10k wake_tx_queue issues
Date: Wed, 16 May 2018 11:22:11 +0200 [thread overview]
Message-ID: <87tvr8ymyk.fsf@toke.dk> (raw)
In-Reply-To: <20180515203102.GA20469@localhost.localdomain>
Niklas Cassel <niklas.cassel@linaro.org> writes:
> [ .. snip .. ]
>> > Sure, the regular way ath10k_mac_op_wake_tx_queue is called is via
>> > ieee80211_subif_start_xmit => __ieee80211_subif_start_xmit => ieee80211_xmit_fast
>> > => ieee80211_queue_skb => drv_wake_tx_queue.
>> >
>> > But I was expecting the call to ieee80211_wake_queue to somehow trigger a call
>> > to ath10k_mac_op_wake_tx_queue, since there is still data in the send buffer/
>> > in the ieee80211_txq that needs to be sent, to allow more data to be written to
>> > the socket. But obviously the callback never comes.
>> > Or how else is this supposed to work?
>>
>> The driver should reschedule itself before/after calling
>> ieee80211_wake_queue. mt76 does this; I'm not actually sure if ath9k
>> does the right thing either, I'm not too familiar with that part of the
>> code. There's no direct call to reschedule that I can see, but there may
>> be another reason why this is not needed for ath9k. I'm sure Felix
>> knows?
>
> Hello Toke
>
> Unfortunately, it doesn't look like mt76 uses any ieee80211_* function
> to reschedule.
It doesn't need to; it just reschedules itself.
Basically, the wake_tx_queue() callback is just a way for mac80211 to
notify the driver that new packets are available and that it should
start its scheduling function. But in this case it is the driver that is
restarting the queues, so it already knows that. And so it can just call
its internal scheduling function. This is what mt76 does in
mt76_dma_tx_cleanup() with the call to mt76_txq_schedule() before
calling ieee80211_wake_queue().
I think that what ath10k should be doing is calling
ath10k_mac_tx_push_pending() when it restarts the queues.
> I just came across a ieee80211_schedule_txq() function in e937b8da5a59
> ("mac80211: Add TXQ scheduling API"). However, this commit was
> reverted. Any plans on resubmitting this?
Yeah, I have a revised version lying around waiting for Felix to review
it. But that wouldn't help this bug; it's just an API change, it doesn't
change behaviour...
-Toke
next prev parent reply other threads:[~2018-05-16 9:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 13:45 ath10k wake_tx_queue issues Niklas Cassel
2018-05-15 13:50 ` Ben Greear
2018-05-15 14:13 ` Toke Høiland-Jørgensen
2018-05-15 20:31 ` Niklas Cassel
2018-05-16 5:54 ` Alexander Wetzel
2018-05-16 9:16 ` Niklas Cassel
2018-05-16 9:22 ` Toke Høiland-Jørgensen [this message]
2018-05-16 17:28 ` Erik Stromdahl
2018-05-17 23:47 ` Niklas Cassel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tvr8ymyk.fsf@toke.dk \
--to=toke@toke.dk \
--cc=ath10k@lists.infradead.org \
--cc=erik.stromdahl@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=niklas.cassel@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).