linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Bartosz Szczepanek <barteks7r@gmail.com>,
	Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: add an intermediate software queue implementation
Date: Tue, 16 Dec 2014 10:08:13 +0100	[thread overview]
Message-ID: <548FF67D.4000902@openwrt.org> (raw)
In-Reply-To: <CAJzaN5pix=R8RR5wzv7vbtYfHcGJytuUfd3f1QsNo-QqKUf-8Q@mail.gmail.com>

On 2014-12-16 00:25, Bartosz Szczepanek wrote:
> As for drv_wake_tx_queue and ieee80211_tx_dequeue - is it really
> necessary? There are ieee80211_tx_status and ieee80211_free_txskb
> already, which can be used to decide from mac80211 level when to
> dequeue packet. It could be used even in case of drivers that are not
> aware of new mechanism at all. We could compute difference between
> drv_tx and tx_status/free_txskb calls, therefore getting number of
> frames in HW. What could help us to keep queues short.
Keeping the driver queue short is a bad idea if the driver needs deeper
queues to do aggregation.

> I've already written some code. This http://pastebin.com/dSd1zWt7 is
> patch that implements counter of frames in hardware in the way
> described above. It was necessary to differentiate between free_txskb
> and free_txskb. Information about frames in HW is exported to debugfs.
> I thought I could submit it, but just now did I found this thread, so
> I hope that it's adequate place to propose that. I tested it on ath5k
> and brcmsmac.
For aggregation, different drivers need different kinds of scheduling.
Only packets belonging to the same sta/tid can be aggregated, and in AP
mode you can have concurrent traffic of multiple different sta/tid.
The only way to keep queues really short in that case without
sacrificing throughput is to let the aggregation code fetch packets
directly from sta/tid queues.
With ath5k there is no aggregation yet (we could add A-MSDU at some
point), and with brcmsmac, the driver has an internal layer of queueing
to create per-sta/tid queues.
What I'm proposing is having per-sta/tid queues that are shared between
mac80211 and the driver, which will significantly improve queue
management compared to having multiple competing layers of queueing.

> One more thing - why not to use local->pending for holding packets?
> There is tx_pending tasklet already. I'm not sure if I understand the
> idea of local->pending queues correctly, but it seems to be a bit
> incoherent to have both pending and proposed ieee80211_txq.
local->pending is useless for normal tx queueing purposes, because it's
not per-sta/tid.

- Felix

  reply	other threads:[~2014-12-16  9:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18 23:14 [PATCH] mac80211: add an intermediate software queue implementation Felix Fietkau
2014-12-12 13:21 ` Johannes Berg
2014-12-12 13:40   ` Felix Fietkau
2014-12-12 14:01     ` Johannes Berg
2014-12-12 14:28       ` Felix Fietkau
2014-12-15 12:00         ` Johannes Berg
2014-12-15 23:25           ` Bartosz Szczepanek
2014-12-16  9:08             ` Felix Fietkau [this message]
2014-12-31 14:28 ` Johan Almbladh

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=548FF67D.4000902@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=barteks7r@gmail.com \
    --cc=johannes@sipsolutions.net \
    --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 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).