All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [RFC/RFT 6/7] ath10k: add active htc ul pipe polling support
Date: Wed, 15 May 2013 15:19:43 +0200	[thread overview]
Message-ID: <51938B6F.8050706@tieto.com> (raw)
In-Reply-To: <87a9nwqv00.fsf@kamboji.qca.qualcomm.com>

On 15/05/13 14:37, Kalle Valo wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> Until now we depended solely on passive or lazy
>> polling for tx completion.
>>
>> The passive was in htc rx handler. The lazy in
>> htc_send_work(). The lazy would fire only if there
>> are less than 50% resources free. However for HTT
>> tx we have 2047 resources and we never used more
>> than 512 (HTT_MAX_PENDING_TX).
>>
>> It is a good idea to have a timer that polls for
>> tx completions "just in case". This could help if
>> mac80211 is waiting for tx status and there's no
>> tx/rx happening.
>>
>> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
>
> I haven't tested your patches yet, but I'm a bit concerned about the
> timer. Timers usually create problems of their own and using them wrong
> affect power consumption.
>
> I don't have time to read the patches in detail, but can you give a
> short summary how the timer works? How often is it fired? What happens
> when the data path is idle?

The timer is fired after tx path has became idle after some tx had been 
done. This should make us report tx status to mac80211 more quickly 
(rather than waiting for a beacon, or other frame on HTT rx that would 
trigger the polling).

We could probably try a different scheme - to poll every 20ms as long as 
there is any tx pending. That would be a lot better wrt reporting tx 
status quickly.

Let's just drop this patch. It's not really necessary, at least for now.


> And is it absolutely necessary to use a timer? Can't we use tx
> completions or some other existing event from firmware to accomplish the
> same?

HTT tx is done on a pipe that has interrupts disabled. We need to poll 
for tx completions. We poll them in 2 cases:

  a) when we receive a frame on HTT rx (it's a different pipe, with 
interrupts)

  b) we submit a new HTC frame (so HTT tx request counts) and tx pipe 
resources are drained below 50% (which never happens, because we have 
512 msdu_ids limit, and there are 2047 tx resources on the HTT tx pipe)

The (b) case is solved in patch #7, although it could be done 
differently (by increasing msdu_ids limit to tx pipe limit which is 2047).


-- Pozdrawiam / Best regards, Michal Kazior.

  reply	other threads:[~2013-05-15 13:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10 11:37 [ath9k-devel] [RFC/RFT 0/7] ath10k: tx flow control fixes Michal Kazior
2013-05-10 11:37 ` [ath9k-devel] [RFC/RFT 1/7] ath10k: change errno if we run out of msdu_ids Michal Kazior
2013-05-10 11:37 ` [ath9k-devel] [RFC/RFT 2/7] ath10k: ath10k_htc_prepare_tx_skb() never fails Michal Kazior
2013-05-10 11:37 ` [ath9k-devel] [RFC/RFT 3/7] ath10k: add lockdep asserts to htc skb dequeuing Michal Kazior
2013-05-10 11:37 ` [ath9k-devel] [RFC/RFT 4/7] ath10k: simplify htc flow control Michal Kazior
2013-05-10 11:37 ` [ath9k-devel] [RFC/RFT 5/7] ath10k: remove unused queue limit Michal Kazior
2013-05-10 11:37 ` [ath9k-devel] [RFC/RFT 6/7] ath10k: add active htc ul pipe polling support Michal Kazior
2013-05-15 12:37   ` Kalle Valo
2013-05-15 13:19     ` Michal Kazior [this message]
2013-05-10 11:37 ` [ath9k-devel] [RFC/RFT 7/7] ath10k: introduce proper htt tx flow control Michal Kazior

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=51938B6F.8050706@tieto.com \
    --to=michal.kazior@tieto.com \
    --cc=ath9k-devel@lists.ath9k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.