On Tue, 2007-11-27 at 15:13 +0100, Johannes Berg wrote: > On Mon, 2007-11-26 at 22:30 +0100, Mattias Nissler wrote: > > This changes rc80211_simple failed frame percentage estimation to use an > > exponential moving average method. Failed frames percentage is sampled over > > time and a smoothed average is computed. This average is examined periodically > > and the rate adjusted eventually. > > > > Compared to the old method this new approach is much more responsive. The old > > method used plain tx success/failure counters. This made rate control very > > unresponsive after a short time of using the interface, since old data wouldn't > > age properly. > > Sounds sane and better than before. If it works we can apply this I > guess. Before this goes in, I have at least one issue to be discussed: As it is, the patch calculates the failed frames percentage exclusively from the retry_count. I'm not sure whether this is what we want, because some drivers cannot provide this parameter (or they only know there have been retries, but not how many). This is the case e.g. for the rt2x00 usb devices. I'm not sure what to do about this. My suggestion would be something like: srctrl->tx_num_xmit++; if (status->excessive_retries) { srctrl->tx_num_failed += 2; srctrl->tx_num_xmit++; } else if (status->retry_count) { srctrl->tx_num_failed++; srctrl->tx_num_xmit++; } This accounts correctly transmitted frames as one good, failed frames 2 bad and retry-succeeded frames 1 good + 1 bad point in the failed percentage calculation. Opinions? Mattias - 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