Search Linux Wireless

Re: bug: iwlwifi, aggregation, and mac80211's reorder buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2011-03-11 at 00:11 -0800, Daniel Halperin wrote:

> One thing that Intel does that ath9k does not is transmit packets out
> of sequence number order inside a batch.  (This is legal in the 802.11
> standard).

Even if that's legal it seems very strange? Do you have packet captures
of this by any chance?

> I figured that one explanation for the TCP SACKs would be
> if, somehow, frames got released to the network stack out of order;
> indeed, many of the "holes" covered by the SACKs are filled quickly
> (within ~4ms, about the length of one aggregation batch).  Note that
> iwlwifi defaults to an aggregation frame limit, hence buffer size, of
> 31 frames.  mac80211 honors this buffer size specification by
> releasing frames to the network stack that are >= 31 sequence numbers
> below the highest received frame.
> 
> It looks like Intel doesn't honor its own frame limit, as I often saw
> it have more than 31 frames outstanding, causing mac80211 on the
> receiver to release many frames early.  Changing iwlwifi's default agg
> limit to 63 frames on both ends dramatically reduced the prevalence of
> SACKs/TCP retransmissions and improved avg TCP performance to ~100
> Mbps (ranging 83-110).

Great ... what if you just change the mac80211 code like you suggested?
Does that already help, by making the receiver have a larger window?

> (1) Why does iwlwifi default to an aggregation frame limit of 31? I
> didn't see any negative effects from 63 frame limit and performance
> improved dramatically

Wey-Yi answered this fully afaik.

> (2) Is there a way to make iwlwifi honor the aggregation limit?  I
> know that agg is controlled by a hardware scheduler, so this may be
> difficult.

Heh. I'd hope it already does but I guess if it doesn't then there's
little we can do (but internally report a bug). This is actually not
just a throughput problem, but also a correctness issue, since some
devices do not allow for receiving long aggregates!

> (3) mac80211's reorder buffer code could probably also be relaxed.  It
> probably wouldn't hurt to have the buffer be twice the transmitter's
> advertised buffer, and might compensate for devices that don't
> properly honor frame limits.

Well, it doesn't make sense to go above 64, no? Can't have reordering
across aggregates.

> Also, mac80211 only flushes the reorder
> buffer every 100 ms.  That seems like a LONG time given that batches
> are limited to 4ms -- 100ms is room for at least 10, maybe 20
> retransmissions to attempt to fill in the holes(!).

Yeah that's true, but you don't really know how much time there is
between retries, bluetooth for example might block the retransmission
for quite a while.

> (4) even after this fix, I see a few SACKs, and even when there aren't
> SACKs I still see TCP "dead time" up to ~100ms.  What else would you
> use to debug this setup?

What's "after this fix"?

johannes


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux