zfs/lib/libspl
Alexander Motin 85c43508f3 Introduce write-mostly sums
wmsum counters are a reduced version of aggsum counters, optimized for
write-mostly scenarios.  They do not provide optimized read functions,
but instead allow much cheaper add function.  The primary usage is
infrequently read statistic counters, not requiring exact precision.

The Linux implementation is directly mapped into percpu_counter KPI.
The FreeBSD implementation is directly mapped into counter(9) KPI.
In user-space due to lack of better implementation mapped to aggsum.

Unfortunately neither Linux percpu_counter nor FreeBSD counter(9)
provide sufficient functionality to completelly replace aggsum, so
it still remains to be used for several hot counters.

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #12114
2021-06-09 13:05:34 -07:00
..
asm-generic Fix atomic_clear_long_excl wrong return 2020-07-06 11:46:17 -07:00
asm-i386 Changes to make openzfs build within FreeBSD buildworld 2020-07-31 21:30:31 -07:00
asm-x86_64 Fixes for make dist 2020-06-26 14:20:02 -07:00
include Introduce write-mostly sums 2021-06-09 13:05:34 -07:00
os linux/libspl: gethostid: read from /proc/sys/kernel/spl/hostid, simplify 2021-04-19 15:22:57 -07:00
Makefile.am cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
assert.c Move libspl_assertf into .c file 2020-07-10 14:25:24 -07:00
list.c Fixing gang ABD child removal race condition 2020-07-14 11:04:35 -07:00
mkdirp.c Fix typos in lib/ 2019-09-02 17:53:27 -07:00
page.c ABD optimized page allocation code 2016-11-29 14:34:33 -08:00
strlcat.c Check for strlcat and strlcpy 2018-12-11 16:01:41 -08:00
strlcpy.c Check for strlcat and strlcpy 2018-12-11 16:01:41 -08:00
timestamp.c Always use "%lld" for formatting time_ts 2020-05-28 10:29:58 -07:00