linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: <ath10k@lists.infradead.org>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] ath10k: fix issues on non-preemptible systems
Date: Wed, 28 Aug 2013 07:02:24 +0300	[thread overview]
Message-ID: <877gf6lay7.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQ=ycKd0Z60wHTWHoq7hBz1W2iW+ahjVmc_nFLQmU7-1Bg@mail.gmail.com> (Michal Kazior's message of "Tue, 27 Aug 2013 09:30:29 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

> On 27 August 2013 09:06, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>
>> I consider this more as a workaround as a real fix. Would NAPI be a
>> proper fix for issues like this?
>>
>> NAPI support was removed from mac80211 six months ago, but I guess we
>> could try to get it back if we have a good reason:
>>
>> http://marc.info/?l=linux-wireless&m=136204135907491
>
> Hmm. From what I understand NAPI is used for RX polling. My patch
> addresses mainly WMI/HTT TX starvation.

I thought I saw something related to NAPI on TX as well, but I can't
find it anymore.

> There's another solution that I had in mind. Instead of:
>
>   for (;;) { dequeue(z); process; }
>
> I did:
>
>   q = dequeue_all(z); for (;;) { dequeue(q); process; }
>
> I.e. move all queued stuff at the worker entry and move it out of the
> global queue, that can, and will be, having more stuff queued while
> the worker does its job).
>
> This way workers would exit/restart more often, but from what I tested
> it didn't really solve the problem. Given enough traffic HTC worker
> responsible for HTT TX gets overwhelmed eventually. You could try
> limit how many frames a worker can process during one execution, but
> how do you guess that? This starvation depends on how fast your CPU
> is.

I think we should come up with better ways to handle this. To have a
quota (like you mention above) would be one option. Other option would
be to have multiple queues and some sort of priorisation or fair
queueing.

And most importantly of all, we should minimise the lenght of queue we
have inside ath10k. I'm worried that we queue way too many packets
within ath10k right now.

> Thus I opted for sole cond_resched().

Yeah, this is a good workaround for the problem. But it would be good to
get bottom of this as well.

>>> +#ifndef CONFIG_PREEMPT
>>> +             cond_resched();
>>> +#endif
>>
>> Why the #ifndef? Why should we not call cond_resched() when PREEMPT is
>> enabled? Does something negative happen then?
>
> I think it should be okay. I saw the #ifndef thing in b43legacy and
> thought it simply makes sense (although it's unsightly).

For various reasons I would prefer to have cond_resched() without the
#ifndef, if possible.

-- 
Kalle Valo

  reply	other threads:[~2013-08-28  4:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21  6:34 [PATCH 0/3] ath10k: fixes Michal Kazior
2013-08-21  6:34 ` [PATCH 1/3] ath10k: make the workqueue multithreaded Michal Kazior
2013-08-21  6:34 ` [PATCH 2/3] ath10k: move htt rx processing to worker Michal Kazior
2013-08-21  6:34 ` [PATCH 3/3] ath10k: fix issues on non-preemptible systems Michal Kazior
2013-08-22 10:05 ` [PATCH 0/3] ath10k: fixes Michal Kazior
2013-08-26  8:53 ` [PATCH v2 0/4] " Michal Kazior
2013-08-26  8:53   ` [PATCH v2 1/4] ath10k: synchronize tx/rx reporting to mac80211 Michal Kazior
2013-08-28  4:23     ` Kalle Valo
2013-08-28 10:54       ` Michal Kazior
2013-08-28 11:04         ` Kalle Valo
2013-08-26  8:53   ` [PATCH v2 2/4] ath10k: make the workqueue multithreaded Michal Kazior
2013-08-26  8:53   ` [PATCH v2 3/4] ath10k: move htt rx processing to worker Michal Kazior
2013-08-26  8:53   ` [PATCH v2 4/4] ath10k: fix issues on non-preemptible systems Michal Kazior
2013-08-27  7:06     ` Kalle Valo
2013-08-27  7:30       ` Michal Kazior
2013-08-28  4:02         ` Kalle Valo [this message]
2013-08-28 13:16           ` Michal Kazior
2013-08-26 20:20   ` [PATCH v2 0/4] ath10k: fixes Luis R. Rodriguez
2013-08-27  5:42     ` Michal Kazior
2013-08-27  7:59       ` Luis R. Rodriguez
2013-08-27  6:57     ` Kalle Valo
2013-08-27  8:01       ` Luis R. Rodriguez
2013-08-28  3:53         ` Kalle Valo

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=877gf6lay7.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.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).