summaryrefslogtreecommitdiffstats
path: root/module/zfs/arc.c
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2021-02-20 01:34:33 -0500
committerGitHub <[email protected]>2021-02-19 22:34:33 -0800
commit64e0fe14fff465604952d576051ca80c2f1be898 (patch)
tree61cb2bbb0c8f011b60534d21a583fba38af30a17 /module/zfs/arc.c
parent03e02e5b561f7f60597dd905414eb476610740cc (diff)
Restore FreeBSD resource usage accounting
Add zfs_racct_* interfaces for platform-dependent read/write accounting. Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #11613
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r--module/zfs/arc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index b4f0c8a85..9be0a4e8a 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -308,6 +308,7 @@
#include <sys/aggsum.h>
#include <cityhash.h>
#include <sys/vdev_trim.h>
+#include <sys/zfs_racct.h>
#include <sys/zstd/zstd.h>
#ifndef _KERNEL
@@ -6302,6 +6303,7 @@ top:
ARCSTAT_CONDSTAT(!HDR_PREFETCH(hdr),
demand, prefetch, !HDR_ISTYPE_METADATA(hdr), data,
metadata, misses);
+ zfs_racct_read(size, 1);
}
/* Check if the spa even has l2 configured */