mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Add support for per dataset zil stats and use wmsum counters
ZIL kstats are reported in an inclusive way, i.e., same counters are shared to capture all the activities happening in zil. Added support to report zil stats for every datset individually by combining them with already exposed dataset kstats. Wmsum uses per cpu counters and provide less overhead as compared to atomic operations. Updated zil kstats to replace wmsum counters to avoid atomic operations. Reviewed-by: Christian Schwarz <christian.schwarz@nutanix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes #13636
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <sys/wmsum.h>
|
||||
#include <sys/dmu.h>
|
||||
#include <sys/kstat.h>
|
||||
#include <sys/zil.h>
|
||||
|
||||
typedef struct dataset_sum_stats_t {
|
||||
wmsum_t dss_writes;
|
||||
@@ -56,14 +57,19 @@ typedef struct dataset_kstat_values {
|
||||
* entry is removed from the unlinked set
|
||||
*/
|
||||
kstat_named_t dkv_nunlinked;
|
||||
/*
|
||||
* Per dataset zil kstats
|
||||
*/
|
||||
zil_kstat_values_t dkv_zil_stats;
|
||||
} dataset_kstat_values_t;
|
||||
|
||||
typedef struct dataset_kstats {
|
||||
dataset_sum_stats_t dk_sums;
|
||||
zil_sums_t dk_zil_sums;
|
||||
kstat_t *dk_kstats;
|
||||
} dataset_kstats_t;
|
||||
|
||||
void dataset_kstats_create(dataset_kstats_t *, objset_t *);
|
||||
int dataset_kstats_create(dataset_kstats_t *, objset_t *);
|
||||
void dataset_kstats_destroy(dataset_kstats_t *);
|
||||
|
||||
void dataset_kstats_update_write_kstats(dataset_kstats_t *, int64_t);
|
||||
|
||||
Reference in New Issue
Block a user