Re: [PATCH] Add generic exponentially weighted moving average function

From: Ben Pfaff
Date: Fri Oct 15 2010 - 00:01:07 EST


Randy Dunlap <randy.dunlap@xxxxxxxxxx> writes:

> On Wed, 06 Oct 2010 18:32:25 +0900 Bruno Randolf wrote:
>
>> This adds a generic exponentially weighted moving average function. This
>> implementation makes use of a structure which keeps a scaled up internal
>> representation to reduce rounding errors.
>>
>> The idea for this implementation comes from the rt2x00 driver (rt2x00link.c)
>> and i would like to use it in several places in the mac80211 and ath5k code.
>
> I guess I don't understand "exponentially weighted" or why that would
> be desirable. Please try to explain (briefly).

I wrote up a fairly non-brief explanation of exponentially
weighted moving averages a few years ago:
http://www.stanford.edu/class/cs140/projects/pintos/pintos_7.html#SEC134
--
Ben Pfaff
http://benpfaff.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/