Skip to contentSkip to conversation

introduce a cache options for PV disks

PATCH Stefano Stabellini 2 participants 4 messages Jun 26, 2013 – Jun 27, 2013

lore
Share & tools
lore
#0 lore raw

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".

docs/misc/vbd-interface.txt +23 -0
index 3952e73..0584e78 100644
@@ -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
+options:
+
+* 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
 -------------------------
 
docs/misc/xl-disk-configuration.txt +19 -0
index 5bd456d..51d376f 100644
@@ -178,6 +178,25 @@ information to be interpreted by the executable program <script>,
 These scripts are normally called "block-<script>".
 
 
+cache=<cache>
+-------------
+
+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
+http://lists.xen.org/archives/html/xen-devel/2012-12/msg01154.html.
+Otherwise using "none" is safe and gives you better performances.
+
+
+
 
 ============================================
 DEPRECATED PARAMETERS, PREFIXES AND SYNTAXES
#1 lore raw
Quoted 6 lines · Stefano Stabellini

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".

The exiting ones are already documented in xen/include/public/io/blkif.h

It's a bit of a shame that things are split over two files but I think putting the new one in blkif.h is better than duplicating things further.

Quoted 17 lines
docs/misc/vbd-interface.txt +6 -0
index 3952e73..0584e78 100644
@@ -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
+options:
+

docs/misc/vbd-interface.txt Guests SHOULD ignore numbers that they do not understand or · line 114

Quoted 10 lines
docs/misc/vbd-interface.txt +10 -0
+* 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)

I'm not sure the bracketed descriptions are adding anything.

Quoted 45 lines
docs/misc/vbd-interface.txt +7 -0
+* device-type
+Description:           type of device the backend corresponds to
+Mandatory:             No
+Supported values:      "cdrom", "disk"
+
+
+
 Notes on Linux as a guest
 -------------------------
 
docs/misc/xl-disk-configuration.txt +19 -0
index 5bd456d..51d376f 100644
@@ -178,6 +178,25 @@ information to be interpreted by the executable program <script>,
 These scripts are normally called "block-<script>".
 
 
+cache=<cache>
+-------------
+
+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
+http://lists.xen.org/archives/html/xen-devel/2012-12/msg01154.html.
+Otherwise using "none" is safe and gives you better performances.
+
+
+
 
 ============================================
 DEPRECATED PARAMETERS, PREFIXES AND SYNTAXES

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 5 lines · Ian Campbell
Quoted 4 lines · Stefano Stabellini

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.

Quoted 8 lines
Quoted 2 lines

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

The exiting ones are already documented in xen/include/public/io/blkif.h

It's a bit of a shame that things are split over two files but I think putting the new one in blkif.h is better than duplicating things further.

Ah, that's why I couldn't find it under docs!

Quoted 20 lines
Quoted 20 lines
docs/misc/vbd-interface.txt +10 -0
index 3952e73..0584e78 100644
@@ -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
+options:
+
+* mode
+Description:           file or device opening flags
+Mandatory:             Yes
+Supported values:      "w" (read/write), "r" (read-only)
Quoted 8 lines

docs/misc/vbd-interface.txt Guests SHOULD ignore numbers that they do not understand or · line 114

Quoted 6 lines
docs/misc/vbd-interface.txt +6 -0
+
+* cache
+Description:           file or device cache mode
+Mandatory:             No
+Supported values:      "none" (no cache), "writeback" (writeback
+                       caching), "writethrough" (writethrough caching)

I'm not sure the bracketed descriptions are adding anything.

OK

Quoted 47 lines
Quoted 45 lines
docs/misc/vbd-interface.txt +7 -0
+* device-type
+Description:           type of device the backend corresponds to
+Mandatory:             No
+Supported values:      "cdrom", "disk"
+
+
+
 Notes on Linux as a guest
 -------------------------
 
docs/misc/xl-disk-configuration.txt +19 -0
index 5bd456d..51d376f 100644
@@ -178,6 +178,25 @@ information to be interpreted by the executable program <script>,
 These scripts are normally called "block-<script>".
 
 
+cache=<cache>
+-------------
+
+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
+http://lists.xen.org/archives/html/xen-devel/2012-12/msg01154.html.
+Otherwise using "none" is safe and gives you better performances.
+
+
+
 
 ============================================
 DEPRECATED PARAMETERS, PREFIXES AND SYNTAXES

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
Quoted 9 lines · Stefano Stabellini
Quoted 8 lines · Ian Campbell
Quoted 6 lines · Stefano Stabellini

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".

Quoted 7 lines
Quoted 5 lines

The exiting ones are already documented in xen/include/public/io/blkif.h

It's a bit of a shame that things are split over two files but I think putting the new one in blkif.h is better than duplicating things further.

Ah, that's why I couldn't find it under docs!

yeah ;-)

If you are reediting this file anyway perhaps you could insert a reference (in both directions perhaps)

Quoted 80 lines
Quoted 22 lines
Quoted 22 lines
docs/misc/vbd-interface.txt +10 -0
index 3952e73..0584e78 100644
@@ -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
+options:
+
+* mode
+Description:           file or device opening flags
+Mandatory:             Yes
+Supported values:      "w" (read/write), "r" (read-only)
Quoted 8 lines

docs/misc/vbd-interface.txt Guests SHOULD ignore numbers that they do not understand or · line 114

Quoted 6 lines
docs/misc/vbd-interface.txt +6 -0
+
+* cache
+Description:           file or device cache mode
+Mandatory:             No
+Supported values:      "none" (no cache), "writeback" (writeback
+                       caching), "writethrough" (writethrough caching)

I'm not sure the bracketed descriptions are adding anything.

OK

Quoted 47 lines
Quoted 45 lines
docs/misc/vbd-interface.txt +7 -0
+* device-type
+Description:           type of device the backend corresponds to
+Mandatory:             No
+Supported values:      "cdrom", "disk"
+
+
+
 Notes on Linux as a guest
 -------------------------
 
docs/misc/xl-disk-configuration.txt +19 -0
index 5bd456d..51d376f 100644
@@ -178,6 +178,25 @@ information to be interpreted by the executable program <script>,
 These scripts are normally called "block-<script>".
 
 
+cache=<cache>
+-------------
+
+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
+http://lists.xen.org/archives/html/xen-devel/2012-12/msg01154.html.
+Otherwise using "none" is safe and gives you better performances.
+
+
+
 
 ============================================
 DEPRECATED PARAMETERS, PREFIXES AND SYNTAXES

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel