linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Vasanthakumar Thiagarajan <vasanth@Atheros.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"ath9k-devel@venema.h4ckr.net" <ath9k-devel@venema.h4ckr.net>
Subject: Re: [PATCH 2/3] ath9k:  Re-start xmit logic in xmit watchdog timer.
Date: Thu, 06 Jan 2011 23:16:06 -0800	[thread overview]
Message-ID: <4D26BDB6.7000806@candelatech.com> (raw)
In-Reply-To: <20110107065101.GB13800@vasanth-laptop>

On 01/06/2011 10:51 PM, Vasanthakumar Thiagarajan wrote:
> On Fri, Jan 07, 2011 at 06:16:04AM +0530, greearb@candelatech.com wrote:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> We should not get to this state, but we do.  What is
>> worse, many times the xmit logic still will not start,
>> probably due to tids being paused when they shouldn't be.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>> ---
>>
>> NOTE:  This needs review.  It might be too much of a hack
>> for upstream code, and at best it works around a small part
>> of the problem.
>>
>> :100644 100644 3aae523... 547fb44... M	drivers/net/wireless/ath/ath9k/xmit.c
>>   drivers/net/wireless/ath/ath9k/xmit.c |   21 +++++++++++++++++++++
>>   1 files changed, 21 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
>> index 3aae523..547fb44 100644
>> --- a/drivers/net/wireless/ath/ath9k/xmit.c
>> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
>> @@ -2110,6 +2110,27 @@ static void ath_tx_complete_poll_work(struct work_struct *work)
>>   				} else {
>>   					txq->axq_tx_inprogress = true;
>>   				}
>> +			} else {
>> +				/* If the queue has pending buffers, then it
>> +				 * should be doing tx work (and have axq_depth).
>> +				 * Shouldn't get to this state I think..but
>> +				 * perhaps we do.
>> +				 */
>> +				if (!list_empty(&txq->axq_acq)) {
>> +					ath_err(ath9k_hw_common(sc->sc_ah),
>> +						"txq: %p axq_qnum: %i,"
>> +						" axq_link: %p"
>> +						" pending frames: %i"
>> +						" axq_acq is not empty, but"
>> +						" axq_depth is zero.  Calling"
>> +						" ath_txq_schedule to restart"
>> +						" tx logic.\n",
>> +						txq, txq->axq_qnum,
>> +						txq->axq_link,
>> +						txq->pending_frames);
>> +					ATH_DBG_WARN_ON_ONCE(1);
>> +					ath_txq_schedule(sc, txq);
>
> NAK. This complete work monitors the hw q periodically and does a reset if a
> hang is detected. This work is no way meant to schedule aggr. This
> change really does not make any sense. Scheduling a tid periodically
> would introduce reordering issues especially when there are more
> retries.

Ok, but if the system is in the state where it hits this code branch, it seems
that no new packets are sent to the chip to be transmitted.  I see this,
for instance, in debugfs (with my debugfs patches applied):

axq-qnum:                    2          3         1         0
axq-depth:                   0          0         0         0
axq-ampdu_depth:             0          0         0         0
axq-stopped                  1          0         0         0
tx-in-progress               0          0         0         0
pending-frames              70          0         0         0
txq_headidx:                 0          0         0         0
txq_tailidx:                 0          0         0         0
axq_q empty:                   0          1         1         0
axq_acq empty:                 0          1         1         1
txq_fifo_pending:              1          1         1         1

The queue is stopped, axq_acq and axq_q are not empty, there are pending frames,
and no axq-depth.  I cannot figure out why the queue is stopped since
it seems it should be running when axq-depth is zero.

Thanks for the review, I'll back this hack out of my testing tree.

Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2011-01-07  7:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07  0:46 [PATCH 1/3] ath9k: Decrease skb size to fit into one page greearb
2011-01-07  0:46 ` [PATCH 2/3] ath9k: Re-start xmit logic in xmit watchdog timer greearb
2011-01-07  6:51   ` Vasanthakumar Thiagarajan
2011-01-07  7:16     ` Ben Greear [this message]
2011-01-07 15:11     ` [ath9k-devel] " Peter Stuge
2011-01-07 15:19       ` Ben Greear
2011-01-07 15:20       ` Vasanthakumar Thiagarajan
2011-01-07  0:46 ` [PATCH 3/3] ath9k: Keep track of stations for debugfs greearb
2011-01-07  2:30   ` [ath9k-devel] " Luis R. Rodriguez
2011-01-07  2:45     ` Ben Greear
2011-01-07  2:49       ` Luis R. Rodriguez
2011-01-07  3:17         ` Ben Greear
2011-01-07 15:36           ` Peter Stuge
2011-01-07 15:52             ` Ben Greear
2011-01-07 20:01             ` Luis R. Rodriguez
2011-01-07 20:25               ` Luis R. Rodriguez
2011-01-07 20:30                 ` Luis R. Rodriguez
2011-01-07 19:46           ` Luis R. Rodriguez
2011-01-07  2:45   ` Felix Fietkau
2011-01-07  2:48     ` Ben Greear
2011-01-07  0:57 ` [ath9k-devel] [PATCH 1/3] ath9k: Decrease skb size to fit into one page Luis R. Rodriguez
2011-01-07  1:03   ` Ben Greear
2011-01-07  1:04 ` Christian Lamparter
2011-01-07  1:23   ` Eric Dumazet
2011-01-07  1:57     ` Luis R. Rodriguez
2011-01-07  2:07       ` Eric Dumazet
2011-01-07  2:13         ` Luis R. Rodriguez
2011-01-07  2:24           ` Eric Dumazet
2011-01-07  2:33             ` Eric Dumazet
2011-01-07 10:58 ` Johannes Berg
2011-01-07 18:34   ` Ben Greear
2011-01-07 20:09     ` [ath9k-devel] " Luis R. Rodriguez
2011-01-07 20:26       ` Eric Dumazet
2011-01-07 22:20         ` Ben Greear
2011-01-07 22:26           ` Eric Dumazet
2011-01-07 22:46             ` Ben Greear
2011-01-09  9:34               ` Johannes Berg

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=4D26BDB6.7000806@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath9k-devel@venema.h4ckr.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=vasanth@Atheros.com \
    /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).