All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] introduce a cache options for PV disks
@ 2013-06-27 11:40 Stefano Stabellini
  2013-06-27 14:21 ` Ian Jackson
  2013-06-27 16:20 ` Ian Jackson
  0 siblings, 2 replies; 21+ messages in thread
From: Stefano Stabellini @ 2013-06-27 11:40 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell, 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 a "cache" xenstore backend option, part of the vbd xenstore
interface.

Add a reference to xen/include/public/io/blkif.h in
docs/misc/vbd-interface.txt.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>


diff --git a/docs/misc/vbd-interface.txt b/docs/misc/vbd-interface.txt
index 3952e73..f873db0 100644
--- a/docs/misc/vbd-interface.txt
+++ b/docs/misc/vbd-interface.txt
@@ -125,3 +125,9 @@ because they directly map the bottom 8 bits of the xenstore integer
 directly to the Linux guest's device number and throw away the rest;
 they can crash due to minor number clashes.  With these guests, the
 workaround is not to supply problematic combinations of devices.
+
+
+Other frontend and backend options
+----------------------------------
+
+See xen/include/public/io/blkif.h for the full list of options.
diff --git a/docs/misc/xl-disk-configuration.txt b/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 <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
diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h
index b9b9d98..f4a271c 100644
--- a/xen/include/public/io/blkif.h
+++ b/xen/include/public/io/blkif.h
@@ -97,6 +97,16 @@
  *
  *      The type of the backing device/object.
  *
+ *
+ * cache
+ *      Values:         "none", "writeback", "writethrough"
+ *      Optional
+ *
+ *      The cache mode that the backend should use to open the backing
+ *      device/object. The backend is not required to support all the
+ *      possible cache modes. If an unsupported cache is requested, the
+ *      backend is free to ignore it.
+ *
  *--------------------------------- Features ---------------------------------
  *
  * feature-barrier

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-06-28  7:39 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27 11:40 [PATCH v2] introduce a cache options for PV disks Stefano Stabellini
2013-06-27 14:21 ` Ian Jackson
2013-06-27 16:09   ` Ian Jackson
2013-06-27 16:24     ` Ian Campbell
2013-06-27 16:30       ` Ian Jackson
2013-06-27 16:34         ` Ian Jackson
2013-06-27 16:41           ` Ian Campbell
2013-06-27 16:50             ` Ian Jackson
2013-06-27 16:58               ` Ian Campbell
2013-06-27 16:41         ` Ian Campbell
2013-06-27 16:35       ` Ian Jackson
2013-06-27 16:20 ` Ian Jackson
2013-06-27 17:06   ` Stefano Stabellini
2013-06-27 17:13     ` Stefano Stabellini
2013-06-27 17:44     ` Ian Jackson
2013-06-27 17:50       ` Stefano Stabellini
2013-06-27 17:59         ` Ian Jackson
2013-06-27 18:01         ` Ian Jackson
2013-06-27 18:04           ` Ian Jackson
2013-06-28  7:39             ` Ian Campbell
2013-06-27 18:12           ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.