lib: Proportions with flexible period
Implement code computing proportions of events of different type (like code in lib/proportions.c) but allowing periods to have different lengths. This allows us to have aging periods of fixed wallclock time which gives better proportion estimates given the hugely varying throughput of different devices - previous measuring of aging period by number of events has the problem that a reasonable period length for a system with low-end USB stick is not a reasonable period length for a system with high-end storage array resulting either in too slow proportion updates or too fluctuating proportion updates. Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: NJan Kara <jack@suse.cz> Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
Showing
include/linux/flex_proportions.h
0 → 100644
lib/flex_proportions.c
0 → 100644
想要评论请 注册 或 登录