WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel][PATCH]ioemu:using write-back as the default cache mode

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel][PATCH]ioemu:using write-back as the default cache mode
From: "Zhang, Yang" <yang.zhang@xxxxxxxxx>
Date: Fri, 27 Feb 2009 12:43:35 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "keir.fraser@xxxxxxxxxxxxx" <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 26 Feb 2009 20:45:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmYlfMwc2Av3JDoTYOHU8lbfaLcTA==
Thread-topic: [Xen-devel][PATCH]ioemu:using write-back as the default cache mode
The default cache mode has been changed from write-back to
write-through after merging in Oct 23. And this make the guest
boot slowly with qcow. This patch changes it to write-back again.

Best Regards
--yang

diff --git a/xenstore.c b/xenstore.c
index 6bfcdbb..7463cef 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -472,7 +472,7 @@ void xenstore_parse_domain_config(int hvm_domid)
 #ifdef CONFIG_STUBDOM
         if (pasprintf(&danger_buf, "%s/device/vbd/%s", danger_path, 
e_danger[i]) == -1)
             continue;
-       if (bdrv_open2(bs, danger_buf, 0 /* snapshot */, &bdrv_vbd) == 0) {
+       if (bdrv_open2(bs, danger_buf, BDRV_O_CACHE_WB | BDRV_O_RDONLY/* 
snapshot and write-back */, &bdrv_vbd) == 0) {
            pstrcpy(bs->filename, sizeof(bs->filename), params);
        } else
 #endif
@@ -498,7 +498,7 @@ void xenstore_parse_domain_config(int hvm_domid)
                }
            }
             pstrcpy(bs->filename, sizeof(bs->filename), params);
-            if (bdrv_open2(bs, params, 0 /* snapshot */, format) < 0)
+            if (bdrv_open2(bs, params, BDRV_O_CACHE_WB | BDRV_O_RDONLY/* 
snapshot and write-back */, format) < 0)
                 fprintf(stderr, "qemu: could not open vbd '%s' or hard disk 
image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? 
format->format_name : "0");
         }
 
-- 
1.6.0.rc1

Attachment: 0001--using-write-back-as-the-default-cache-mode.patch
Description: 0001--using-write-back-as-the-default-cache-mode.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel][PATCH]ioemu:using write-back as the default cache mode, Zhang, Yang <=