Date: Mon, 5 Sep 2011 15:21:18 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r225402 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample Message-ID: <201109051521.p85FLIex043203@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Mon Sep 5 15:21:18 2011 New Revision: 225402 URL: http://svn.freebsd.org/changeset/base/225402 Log: As a temporary workaround, treat MCS error rates 5% higher than the best rate as "ok" when picking a best rate. This is all a hack to avoid having to implement the "correct" solution, whatever that is. For example, minstrel calculates a predicted A-MPDU throughput value based on the average A-MPDU sub-frame count and per-rate TX success probability. This, along with lowering sample_stats to 2 from 10 (ie, spend 2% of TX time trying to sample alternate rates) seems to keep my TCP TX mostly stable at around 120-130mbit for my testing. TODO: * The EWMA doesn't raise quickly enough and seems a bit wrong, eg: [ 0 MCS: 250] 329:329 (100%) (EWMA 63.6%) T 22 F 0 avg 407 last 19144 .. how'd the EWMA come out to be 63% given a 100% success rate overall? It made an incorrect judgement early on and hasn't yet had enough time to correct it. The sampling of other MCS rates is also not optimal - it shouldn't try sampling all of them during the sample interval. Instead, come up with a more intelligent way of picking the MCS rates to sample. Finally, comparing MCS rates by number is incorrect. This really should compare the per-rate throughput value, as higher MCS rate != higher throughput. But, as said above, this is "good enough" for local testing. It shouldn't be merged into -HEAD like this. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 15:11:01 2011 (r225401) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 15:21:18 2011 (r225402) @@ -206,13 +206,15 @@ pick_best_rate(struct ath_node *an, cons continue; /* - * For HT, Don't use a bit rate that has a higher failure - * rate than the current. + * For HT, Don't use a bit rate that is much more + * lossy than the best. * - * XXX This isn't optimal! + * XXX this isn't optimal; it's just designed to + * eliminate rates that are going to be obviously + * worse. */ if (an->an_node.ni_flags & IEEE80211_NODE_HT) { - if (best_rate_pct > pct) + if (best_rate_pct > (pct + 50)) continue; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109051521.p85FLIex043203>