[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC V2 03/16] qcow2: Add deduplication metrics structures.
From: |
Benoît Canet |
Subject: |
[Qemu-devel] [RFC V2 03/16] qcow2: Add deduplication metrics structures. |
Date: |
Wed, 6 Feb 2013 13:32:06 +0100 |
---
block/qcow2.h | 3 ++-
include/block/block.h | 11 +++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/block/qcow2.h b/block/qcow2.h
index 18e2974..fc393d5 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -234,9 +234,10 @@ typedef struct BDRVQcowState {
int32_t dedup_table_size;
GTree *dedup_tree_by_hash;
GTree *dedup_tree_by_sect;
+ CoMutex dedup_lock;
+ BlockDeduplicationMetrics dedup_metrics;
CoMutex lock;
- CoMutex dedup_lock;
uint32_t crypt_method; /* current crypt method, 0 if no key yet */
uint32_t crypt_method_header;
diff --git a/include/block/block.h b/include/block/block.h
index 5c3b911..162f8a9 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -12,6 +12,17 @@
typedef struct BlockDriver BlockDriver;
typedef struct BlockJob BlockJob;
+typedef struct {
+ uint64_t deduplicated_clusters;
+ uint64_t non_deduplicated_clusters;
+ uint64_t missing_data_reads; /* reads used to complete partials clusters */
+ uint64_t ram_hash_creations; /* RAM based lookup */
+ uint64_t ram_hash_deletions; /* RAM based lookup */
+ uint64_t ram_usage; /* RAM usage in bytes */
+ uint64_t deleted_clusters; /* number of deleted clusters */
+ uint64_t refcount_overflows; /* number of refcount overflows */
+} BlockDeduplicationMetrics;
+
typedef struct BlockDriverInfo {
/* in bytes, 0 if irrelevant */
int cluster_size;
--
1.7.10.4
- [Qemu-devel] [RFC V2 00/16] QCOW2 deduplication metrics, Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V2 01/16] qcow2: Add qcow2_co_dedup_resume to restart deduplication., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V2 03/16] qcow2: Add deduplication metrics structures.,
Benoît Canet <=
- [Qemu-devel] [RFC V2 05/16] qcow2: Collect unaligned writes missing data reads metric., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V2 06/16] qcow2: Collect deduplicated cluster metric., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V2 14/16] qcow2: Add qcow2_dedup_update_metrics to compute dedup RAM usage., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V2 15/16] qcow2: returns deduplication metrics and status via bdrv_get_info(), Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V2 10/16] qcow2: Count cluster deleted metric, Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V2 11/16] qcow2: Count deduplication refcount overflow metric., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V2 07/16] qcow2: Collect undeduplicated cluster metric., Benoît Canet, 2013/02/06
- [Qemu-devel] [RFC V2 02/16] qcow2: Enable the deduplication feature., Benoît Canet, 2013/02/06