Skip to content

Commit e3a7b45

Browse files
blochlkevmw
authored andcommitted
qcow2: Fix cache-clean-interval documentation
Fixing cache-clean-interval documentation following the recent change to a default of 600 seconds on supported plarforms (only Linux currently). Signed-off-by: Leonid Bloch <lbloch@janustech.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
1 parent cb53460 commit e3a7b45

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

docs/qcow2-cache.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -202,18 +202,18 @@ Reducing the memory usage
202202
It is possible to clean unused cache entries in order to reduce the
203203
memory usage during periods of low I/O activity.
204204

205-
The parameter "cache-clean-interval" defines an interval (in seconds).
206-
All cache entries that haven't been accessed during that interval are
207-
removed from memory.
205+
The parameter "cache-clean-interval" defines an interval (in seconds),
206+
after which all the cache entries that haven't been accessed during the
207+
interval are removed from memory. Setting this parameter to 0 disables this
208+
feature.
208209

209-
This example removes all unused cache entries every 15 minutes:
210+
The following example removes all unused cache entries every 15 minutes:
210211

211212
-drive file=hd.qcow2,cache-clean-interval=900
212213

213-
If unset, the default value for this parameter is 600. Setting it to 0
214-
disables this feature.
214+
If unset, the default value for this parameter is 600 on platforms which
215+
support this functionality, and is 0 (disabled) on other platforms.
215216

216-
Note that this functionality currently relies on the MADV_DONTNEED
217-
argument for madvise() to actually free the memory. This is a
218-
Linux-specific feature, so cache-clean-interval is not supported in
219-
other systems.
217+
This functionality currently relies on the MADV_DONTNEED argument for
218+
madvise() to actually free the memory. This is a Linux-specific feature,
219+
so cache-clean-interval is not supported on other systems.

qapi/block-core.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2895,7 +2895,8 @@
28952895
#
28962896
# @cache-clean-interval: clean unused entries in the L2 and refcount
28972897
# caches. The interval is in seconds. The default value
2898-
# is 600, and 0 disables this feature. (since 2.5)
2898+
# is 600 on supporting platforms, and 0 on other
2899+
# platforms. 0 disables this feature. (since 2.5)
28992900
#
29002901
# @encrypt: Image decryption options. Mandatory for
29012902
# encrypted images, except when doing a metadata-only

qemu-options.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,8 @@ it which is not used for the L2 cache)
747747

748748
@item cache-clean-interval
749749
Clean unused entries in the L2 and refcount caches. The interval is in seconds.
750-
The default value is 600. Setting it to 0 disables this feature.
750+
The default value is 600 on supporting platforms, and 0 on other platforms.
751+
Setting it to 0 disables this feature.
751752

752753
@item pass-discard-request
753754
Whether discard requests to the qcow2 device should be forwarded to the data

0 commit comments

Comments
 (0)