bcachefs: mean_and_variance: put struct mean_and_variance_weighted on a diet

The only caller of this code (time_stats) always knows the weights and
whether or not any information has been collected.  Pass this
information into the mean and variance code so that it doesn't have to
store that information.  This reduces the structure size from 24 to 16
bytes, which shrinks each time_stats counter to 192 bytes from 208.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Darrick J. Wong 2024-02-08 18:33:35 -05:00 • committed by Kent Overstreet
commit 4b4f0876ab
6 changed files with 84 additions and 67 deletions