linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: nbd@nbd.name
Subject: Re: [RFC 5/6] mac80211: add a general fallback TXQ
Date: Thu, 22 Jun 2017 10:48:28 +0200	[thread overview]
Message-ID: <1498121308.2246.5.camel@sipsolutions.net> (raw)
In-Reply-To: <20170621235022.25362-5-johannes@sipsolutions.net> (sfid-20170622_015033_568541_05A27CAD)

On Thu, 2017-06-22 at 01:50 +0200, Johannes Berg wrote:

> In a number of cases, like management frames, mac80211 will not
> put the frame on any TXQ but immediately TX it to the driver.
> It'd be nicer to be able to use TXQs for all frames, so add a
> "fallback" TXQ. This will serve as a container to be able to
> remove all the non-TXQ queueing in mac80211.

This patch is completely broken right now.

When TXQs are enabled, there's still buffering of frames that are *not*
marked with IEEE80211_TX_INTFL_OFFCHAN_TX_OK, and that happens on the
ieee80211_tx_frags() path, using the queue_stop_reasons etc. In fact,
even the drivers can still ask to buffer such frames by stopping their
queues...

I want to move all of that over to the TXQs instead, so that we can get
rid of that buffering logic.

The way to do that would be to not return any frames from TXQs when
they're in off-channel state (and drivers can also stop scheduling the
queues in those cases).

However, if *everything* moves to TXQs, that means we need another TXQ
for those frames that are marked with IEEE80211_TX_INTFL_OFFCHAN_TX_OK,
so that they can go out at any time.

So I think the solution is to add *two* new TXQs in this patch, one for
on-channel frames and one for off-channel frames.

But that's also awkward when you take into account channel contexts,
since all those frames might still need to go to different ones.

Perhaps then the better solution would be to have a TXQ per channel
context, and one for more the remaining frames that. Yeah, this feels
slightly odd - why bother putting frames on a TXQ that shouldn't really
be buffered - but it fits better with the model (the hybrid push/pull
model we have now is somewhat awkward), and there are other reasons
than being off-channel to buffer frames, e.g. if the driver queue got
full, or the driver is doing something else where it can't easily
handle data frames etc.

Thoughts, anyone?

johannes

  reply	other threads:[~2017-06-22  8:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21 23:50 [RFC 1/6] mac80211: agg-tx: call drv_wake_tx_queue in proper context Johannes Berg
2017-06-21 23:50 ` [RFC 2/6] mac80211: fix VLAN handling with TXQs Johannes Berg
2017-06-21 23:50 ` [RFC 3/6] mac80211: add a TXQ for other powersave-buffered frames Johannes Berg
2017-06-22  0:02   ` Ben Greear
2017-06-22  6:24     ` Johannes Berg
2017-06-22 14:43       ` Ben Greear
2017-06-23  9:21         ` Johannes Berg
2017-06-23 12:27           ` Ben Greear
2017-06-26 11:00             ` Johannes Berg
2017-06-26 14:15               ` Ben Greear
2017-06-26 14:27                 ` Johannes Berg
2017-06-21 23:50 ` [RFC 4/6] mac80211: don't put null-data frames on the normal TXQ Johannes Berg
2017-06-21 23:50 ` [RFC 5/6] mac80211: add a general fallback TXQ Johannes Berg
2017-06-22  8:48   ` Johannes Berg [this message]
2017-06-21 23:50 ` [RFC 6/6] mac80211: always go through txqs 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=1498121308.2246.5.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /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).