yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-qcow2-Fix-cache-clean-interval-documentation.patch

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