[PATCH v7 2/7] latencystats: do not use floating point
Konstantin Ananyev
konstantin.ananyev at huawei.com
Fri Feb 14 09:52:43 CET 2025
> The cycle counts do not need to be stored as floating point.
> Instead keep track of latency in cycles, and convert to
> nanoseconds when read.
>
> Use scaled math with exponential Weighted Moving Average weight
> of .25 to avoid use of floating point for that.
>
> The average latency took too long to "warm up".
> Do what RFC 6298 suggests and initialize on first sample.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> Acked-by: Morten Brørup <mb at smartsharesystems.com>
> ---
> lib/latencystats/rte_latencystats.c | 128 ++++++++++++++++------------
> 1 file changed, 73 insertions(+), 55 deletions(-)
>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
> 2.47.2
More information about the dev
mailing list