From: Nathaniel Smith <njs@pobox.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: bloat-devel@lists.bufferbloat.net, johannes@sipsolutions.net,
linux-wireless@vger.kernel.org
Subject: Re: [RFC v2] mac80211: implement eBDP algorithm to fight bufferbloat
Date: Sat, 19 Feb 2011 16:37:00 -0800 [thread overview]
Message-ID: <AANLkTinTcdbjSYvt7Z_yOe_8kGZnyp2MBXZYYJ9zGB_D@mail.gmail.com> (raw)
In-Reply-To: <1298064074-8108-1-git-send-email-linville@tuxdriver.com>
Actually, a few more comments just occurred to me...
On Fri, Feb 18, 2011 at 1:21 PM, John W. Linville
<linville@tuxdriver.com> wrote:
> Johannes' comment about tx status reporting being unreliable (and what
> he was really saying) finally sunk-in. So, this version uses
> skb->destructor to track in-flight fragments. That should handle
> fragments that get silently dropped in the driver for whatever reason
> without leaking queue capacity. Correct me if I'm wrong!
Should we be somehow filtering out and ignoring the packets that get
dropped, when we're calculating the average packet transmission rate?
Presumably they're getting dropped almost instantly, so they don't
really take up queue space and they have abnormally fast transmission
times, which will tend to cause us to overestimate max_enqueued? They
should be rare, though, at least. (And presumably we *should* include
packets that get dropped because their retry timer ran out, since they
were sitting in the queue for that long.) Possibly we should just
ignore any packet that was handled in less than, oh, say, a few
microseconds?
Alternatively, if we aren't worried about those packets, then is there
any reason this patch should be mac80211 specific?
> +static void ieee80211_tx_skb_free(struct sk_buff *skb)
> +{
> + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
> + struct ieee80211_local *local = sdata->local;
> + int q = skb_get_queue_mapping(skb);
> +
> + /* decrement enqueued count */
> + atomic_dec(&sdata->qdata[q].enqueued);
> +
> + /* if queue stopped, wake it */
> + if (ieee80211_queue_stopped(&local->hw, q))
> + ieee80211_wake_queue(&local->hw, q);
> +}
I think you need to check that .enqueued is < max_enqueued here,
instead of waking the queue unconditionally.
Suppose the data rate drops while there's a steady flow -- our
max_enqueued value will drop below the current queue size, but because
we wake the queue unconditionally after each packet goes out, and then
only stop it again after we've queued at least one new packet, we
might get 'stuck' with an over-large queue.
-- Nathaniel
next prev parent reply other threads:[~2011-02-20 0:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1297619803-2832-1-git-send-email-njs@pobox.com>
2011-02-17 1:49 ` [RFC] " John W. Linville
2011-02-17 3:31 ` Ben Greear
2011-02-17 4:26 ` Nathaniel Smith
2011-02-17 8:31 ` Johannes Berg
2011-02-18 21:21 ` [RFC v2] " John W. Linville
2011-02-19 3:44 ` Nathaniel Smith
2011-02-21 18:47 ` John W. Linville
2011-02-21 23:26 ` Nathaniel Smith
2011-02-23 22:28 ` John W. Linville
2011-02-25 18:21 ` Nathaniel Smith
2011-02-25 18:27 ` Nathaniel Smith
2011-02-20 0:37 ` Nathaniel Smith [this message]
2011-02-20 0:51 ` Jim Gettys
2011-02-20 15:24 ` Dave Täht
2011-02-21 18:52 ` John W. Linville
2011-02-21 15:28 ` Johannes Berg
2011-02-21 16:12 ` Jim Gettys
2011-02-21 19:15 ` John W. Linville
2011-02-21 19:06 ` John W. Linville
2011-02-21 19:29 ` [RFC v2] mac80211: implement eBDP algorithm to fight bufferbloat - AQM on hosts Jim Gettys
2011-02-21 20:26 ` [RFC v2] mac80211: implement eBDP algorithm to fight bufferbloat Tianji Li
2011-02-28 13:07 ` Johannes Berg
[not found] <x1-oTZGm1A7eclvABnv1aK0z1Nc7iI@gwene.org>
2011-02-20 1:59 ` Dave Täht
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=AANLkTinTcdbjSYvt7Z_yOe_8kGZnyp2MBXZYYJ9zGB_D@mail.gmail.com \
--to=njs@pobox.com \
--cc=bloat-devel@lists.bufferbloat.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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