From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: Question on iwlwifi iwl_mvm_mac_itxq_xmit, possible busy-spin.
Date: Tue, 29 Oct 2024 09:01:41 +0100 [thread overview]
Message-ID: <1f6d998c16510426e57b774c42358dcef7a5cd31.camel@sipsolutions.net> (raw)
In-Reply-To: <8dce89a1-350c-4885-afcc-0eda162fd76c@candelatech.com>
On Mon, 2024-10-28 at 10:48 -0700, Ben Greear wrote:
>
> We see indication that the iwlwifi txpath can busy-spin,
> causing soft-lockup (and, only indication at this point, possibly
> issue is elsewhere somehow).
TX path I'm not aware of any issues, but we did have this recently:
https://bugzilla.kernel.org/show_bug.cgi?id=219375
> But, I also wanted to check on expected behaviour. At the bottom is a double
> loop. The inner will break out if the queues are full and for some other reasons,
> but the outside loop is spinning on a different atomic counter. The question is:
> If the inner loop breaks out, at least for queue full reasons, should it then
> immediately break out of the outer while loop as well?
It shouldn't matter, but off the top of my head I'd say it's valid to
break out entirely since the "queue no longer full" indication will
restart it. In fact, it seems that'd really make more sense than the
"sofar" thing you added. Not much value in retrying if the queue is full
anyway?
> And, from what I can tell, it would be possible for other transmitters to hit this
> path,
Not really? It should only get here from two places: userspace
(serialized, so you're not going to get to this point with two threads
from there), and the "queue no longer full" logic I mentioned above. Oh,
maybe technically a third at the beginning after allocating a new queue.
> Based on the description of the 3 tx_request states, I am also not sure that
> this would not hang the tx path in case where inner loop bails out due to
> tx queue full, leaving packets queued. If no other packets are ever transmitted,
> is there anything that would re-kick the xmit path?
If the queue becomes "not full", then yes, that kicks it again.
I guess I could sort of see a scenario where
- queues got full
- queues got not full
- we kick this logic via "queue not full"
- while this is running, userspace TX permanently bumps
tx_request from 1 to 2, this decrements it again, etc.
What thread is the soft lockup in that you see?
johannes
next prev parent reply other threads:[~2024-10-29 8:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 17:48 Question on iwlwifi iwl_mvm_mac_itxq_xmit, possible busy-spin Ben Greear
2024-10-29 8:01 ` Johannes Berg [this message]
2024-10-29 15:55 ` Ben Greear
2024-10-29 16:02 ` Johannes Berg
2024-10-29 16:13 ` Ben Greear
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=1f6d998c16510426e57b774c42358dcef7a5cd31.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.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.