Re: [PATCH v2 1/3] mac80211: fix mesh moving average stuck
From: Johannes Berg <johannes@sipsolutions.net>
Date: 2017-02-08 08:30:37
From: Johannes Berg <johannes@sipsolutions.net>
Date: 2017-02-08 08:30:37
On Tue, 2017-01-31 at 12:07 -0800, Rajkumar Manoharan wrote:
As moving average is not considering fractional part after certain ratio, it will stuck at the same state. For example with current values, moving average stuck at 96 and it will not move forward. Fortunately current threshold is matching against 95%. If thresold is increased more than 96, mesh path never be deactivated under worst case. Fix failure average movement by bumping up average at stuck state.
This is ... really strange to me. Can't we just actually take into account fractional parts instead? I think you should instead convert this to the EMWA helpers (see include/linux/average.h). johannes