Use wmsum for arc, abd, dbuf and zfetch statistics. (#12172)

wmsum was designed exactly for cases like these with many updates
and rare reads.  It allows to completely avoid atomic operations on
congested global variables.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #12172
This commit is contained in:
Alexander Motin
2021-06-16 20:19:34 -04:00
committed by GitHub
parent 9ffcaa370a
commit c4c162c1e8
8 changed files with 777 additions and 215 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ arc_available_memory(void)
static uint64_t
arc_evictable_memory(void)
{
int64_t asize = aggsum_value(&arc_size);
int64_t asize = aggsum_value(&arc_sums.arcstat_size);
uint64_t arc_clean =
zfs_refcount_count(&arc_mru->arcs_esize[ARC_BUFC_DATA]) +
zfs_refcount_count(&arc_mru->arcs_esize[ARC_BUFC_METADATA]) +