Add DECLARE_EWMA() which expands to a per-name EWMA implementation
as used by multiple wireless drivers.
Sposnored by: The FreeBSD Foundation
MFC After: 2 weeks
Reviewed by:
Differential Revision:
Differential D30415
LinuxKPI: add Exponentially Weighted Moving Average implementation bz on May 24 2021, 5:59 PM. Authored by Tags None Referenced Files
Details Add DECLARE_EWMA() which expands to a per-name EWMA implementation Sposnored by: The FreeBSD Foundation Someone with maths/stats clue please verify that I got it right.
Diff Detail
Event TimelineComment Actions LGTM. I can certainly confirm that it computes *a* exponential weighted average; whether it's the one you want (in particular, with _p fractional bits being stored but not returned), I can't say. Comment Actions Also looks good to me. Slightly pedantic suggestions:
Comment Actions I decided I'll get it in as-is and then any follow-ups will be a lot easier to deal with.
I don't know what they do internally.
I was thinking about checking for overflows; maybe we should address these three things? |