|
|
26ba25 |
From 7fa1062d4c4f6581bbe53a68f4cdd78558bcf5e3 Mon Sep 17 00:00:00 2001
|
|
|
26ba25 |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
26ba25 |
Date: Thu, 6 Dec 2018 17:12:40 +0000
|
|
|
26ba25 |
Subject: [PATCH 15/15] qcow2: Fix cache-clean-interval documentation
|
|
|
26ba25 |
|
|
|
26ba25 |
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
|
|
26ba25 |
Message-id: <20181206171240.5674-16-kwolf@redhat.com>
|
|
|
26ba25 |
Patchwork-id: 83298
|
|
|
26ba25 |
O-Subject: [RHEL-8.0 qemu-kvm PATCH 15/15] qcow2: Fix cache-clean-interval documentation
|
|
|
26ba25 |
Bugzilla: 1656507
|
|
|
26ba25 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
26ba25 |
RH-Acked-by: John Snow <jsnow@redhat.com>
|
|
|
26ba25 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
26ba25 |
|
|
|
26ba25 |
From: Leonid Bloch <lbloch@janustech.com>
|
|
|
26ba25 |
|
|
|
26ba25 |
Fixing cache-clean-interval documentation following the recent change to
|
|
|
26ba25 |
a default of 600 seconds on supported plarforms (only Linux currently).
|
|
|
26ba25 |
|
|
|
26ba25 |
Signed-off-by: Leonid Bloch <lbloch@janustech.com>
|
|
|
26ba25 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
26ba25 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
26ba25 |
(cherry picked from commit e3a7b4556ee33feba2b396769a9c8354be06b024)
|
|
|
26ba25 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
26ba25 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
26ba25 |
---
|
|
|
26ba25 |
docs/qcow2-cache.txt | 20 ++++++++++----------
|
|
|
26ba25 |
qapi/block-core.json | 3 ++-
|
|
|
26ba25 |
qemu-options.hx | 3 ++-
|
|
|
26ba25 |
3 files changed, 14 insertions(+), 12 deletions(-)
|
|
|
26ba25 |
|
|
|
26ba25 |
diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt
|
|
|
26ba25 |
index 59358b8..c459bf5 100644
|
|
|
26ba25 |
--- a/docs/qcow2-cache.txt
|
|
|
26ba25 |
+++ b/docs/qcow2-cache.txt
|
|
|
26ba25 |
@@ -202,18 +202,18 @@ Reducing the memory usage
|
|
|
26ba25 |
It is possible to clean unused cache entries in order to reduce the
|
|
|
26ba25 |
memory usage during periods of low I/O activity.
|
|
|
26ba25 |
|
|
|
26ba25 |
-The parameter "cache-clean-interval" defines an interval (in seconds).
|
|
|
26ba25 |
-All cache entries that haven't been accessed during that interval are
|
|
|
26ba25 |
-removed from memory.
|
|
|
26ba25 |
+The parameter "cache-clean-interval" defines an interval (in seconds),
|
|
|
26ba25 |
+after which all the cache entries that haven't been accessed during the
|
|
|
26ba25 |
+interval are removed from memory. Setting this parameter to 0 disables this
|
|
|
26ba25 |
+feature.
|
|
|
26ba25 |
|
|
|
26ba25 |
-This example removes all unused cache entries every 15 minutes:
|
|
|
26ba25 |
+The following example removes all unused cache entries every 15 minutes:
|
|
|
26ba25 |
|
|
|
26ba25 |
-drive file=hd.qcow2,cache-clean-interval=900
|
|
|
26ba25 |
|
|
|
26ba25 |
-If unset, the default value for this parameter is 600. Setting it to 0
|
|
|
26ba25 |
-disables this feature.
|
|
|
26ba25 |
+If unset, the default value for this parameter is 600 on platforms which
|
|
|
26ba25 |
+support this functionality, and is 0 (disabled) on other platforms.
|
|
|
26ba25 |
|
|
|
26ba25 |
-Note that this functionality currently relies on the MADV_DONTNEED
|
|
|
26ba25 |
-argument for madvise() to actually free the memory. This is a
|
|
|
26ba25 |
-Linux-specific feature, so cache-clean-interval is not supported in
|
|
|
26ba25 |
-other systems.
|
|
|
26ba25 |
+This functionality currently relies on the MADV_DONTNEED argument for
|
|
|
26ba25 |
+madvise() to actually free the memory. This is a Linux-specific feature,
|
|
|
26ba25 |
+so cache-clean-interval is not supported on other systems.
|
|
|
26ba25 |
diff --git a/qapi/block-core.json b/qapi/block-core.json
|
|
|
26ba25 |
index 5318c9b..db47fb8 100644
|
|
|
26ba25 |
--- a/qapi/block-core.json
|
|
|
26ba25 |
+++ b/qapi/block-core.json
|
|
|
26ba25 |
@@ -2867,7 +2867,8 @@
|
|
|
26ba25 |
#
|
|
|
26ba25 |
# @cache-clean-interval: clean unused entries in the L2 and refcount
|
|
|
26ba25 |
# caches. The interval is in seconds. The default value
|
|
|
26ba25 |
-# is 600, and 0 disables this feature. (since 2.5)
|
|
|
26ba25 |
+# is 600 on supporting platforms, and 0 on other
|
|
|
26ba25 |
+# platforms. 0 disables this feature. (since 2.5)
|
|
|
26ba25 |
#
|
|
|
26ba25 |
# @encrypt: Image decryption options. Mandatory for
|
|
|
26ba25 |
# encrypted images, except when doing a metadata-only
|
|
|
26ba25 |
diff --git a/qemu-options.hx b/qemu-options.hx
|
|
|
26ba25 |
index 05fabf3..683ab0d 100644
|
|
|
26ba25 |
--- a/qemu-options.hx
|
|
|
26ba25 |
+++ b/qemu-options.hx
|
|
|
26ba25 |
@@ -767,7 +767,8 @@ it which is not used for the L2 cache)
|
|
|
26ba25 |
|
|
|
26ba25 |
@item cache-clean-interval
|
|
|
26ba25 |
Clean unused entries in the L2 and refcount caches. The interval is in seconds.
|
|
|
26ba25 |
-The default value is 600. Setting it to 0 disables this feature.
|
|
|
26ba25 |
+The default value is 600 on supporting platforms, and 0 on other platforms.
|
|
|
26ba25 |
+Setting it to 0 disables this feature.
|
|
|
26ba25 |
|
|
|
26ba25 |
@item pass-discard-request
|
|
|
26ba25 |
Whether discard requests to the qcow2 device should be forwarded to the data
|
|
|
26ba25 |
--
|
|
|
26ba25 |
1.8.3.1
|
|
|
26ba25 |
|