[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] introduce a cache options for PV disks

Document a per-disk cache option in the xl config file to allow users to
select the cache mode that the backend should use to open the disk file
or device.

Document backend options that are part of the vbd xenstore interface.
The existing "mode" and "device-type" as well as the new "cache".

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff --git a/docs/misc/vbd-interface.txt b/docs/misc/vbd-interface.txt
index 3952e73..0584e78 100644
--- a/docs/misc/vbd-interface.txt
+++ b/docs/misc/vbd-interface.txt
@@ -96,6 +96,29 @@ Guests SHOULD ignore numbers that they do not understand or
 recognise.  They SHOULD check supplied numbers for validity.
+Other backend options
+The interface introduces few xenstore nodes to specify other backend
+* mode
+Description:           file or device opening flags
+Mandatory:             Yes
+Supported values:      "w" (read/write), "r" (read-only)
+* cache
+Description:           file or device cache mode
+Mandatory:             No
+Supported values:      "none" (no cache), "writeback" (writeback
+                       caching), "writethrough" (writethrough caching)
+* device-type
+Description:           type of device the backend corresponds to
+Mandatory:             No
+Supported values:      "cdrom", "disk"
 Notes on Linux as a guest
diff --git a/docs/misc/xl-disk-configuration.txt 
index 5bd456d..51d376f 100644
--- a/docs/misc/xl-disk-configuration.txt
+++ b/docs/misc/xl-disk-configuration.txt
@@ -178,6 +178,25 @@ information to be interpreted by the executable program 
 These scripts are normally called "block-<script>".
+Description:           Specifies what type of disk cache to use in the backend
+Supported values:      writeback, writethrough, none
+Mandatory:             No
+Default value:         depends on the backend type
+This does not affect the guest's view of the device. 
+Not all backends implement all cache modes: "phy" only supports "none",
+"qdisk" supports all of them and defaults to "writeback".
+It's important to note that if you are storing the VM disk on a network
+filesystem or a network block device (NFS or ISCSI) it might not be safe
+to use "none", see
+Otherwise using "none" is safe and gives you better performances.

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.