Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
kvm
kvm-qemu-pre0.13-flush-unsafe-snapshot.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kvm-qemu-pre0.13-flush-unsafe-snapshot.patch of Package kvm
From c317728872ee9de44a1514bbe1f1fc8d5f8a7aeb Mon Sep 17 00:00:00 2001 From: Alexander Graf <agraf@suse.de> Date: Wed, 26 May 2010 21:04:32 +0200 Subject: [PATCH] Make cache=unsafe the default for -snapshot When using -snapshot we don't care about data integrity of the cow file at all, so let's disable flushing there and squeeze out the last drop of performance we could possibly get. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> --- qemu-options.hx | 6 +++--- vl.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) Index: qemu-kvm-0.12.3/qemu-options.hx =================================================================== --- qemu-kvm-0.12.3.orig/qemu-options.hx +++ qemu-kvm-0.12.3/qemu-options.hx @@ -162,8 +162,7 @@ the storage subsystem. Writeback caching will report data writes as completed as soon as the data is present in the host page cache. This is safe as long as you trust your host. If your host crashes or loses power, then the guest may experience data -corruption. When using the @option{-snapshot} option, writeback caching is -used by default. +corruption. The host page cache can be avoided entirely with @option{cache=none}. This will attempt to do disk IO directly to the guests memory. QEMU may still perform @@ -177,7 +176,8 @@ In case you don't care about data integr cache=unsafe. This option tells qemu that it never needs to write any data to the disk but can instead keeps things in cache. If anything goes wrong, like your host losing power, the disk storage getting disconnected accidently, -etc. you're image will most probably be rendered unusable. +etc. you're image will most probably be rendered unusable. When using +the @option{-snapshot} option, unsafe caching is always used. Instead of @option{-cdrom} you can use: @example Index: qemu-kvm-0.12.3/vl.c =================================================================== --- qemu-kvm-0.12.3.orig/vl.c +++ qemu-kvm-0.12.3/vl.c @@ -2454,7 +2454,7 @@ DriveInfo *drive_init(QemuOpts *opts, vo bdrv_flags = 0; if (snapshot) { bdrv_flags |= BDRV_O_SNAPSHOT; - cache = 2; /* always use write-back with snapshot */ + cache = 3; /* always use unsafe with snapshot */ } if (cache == 0) /* no caching */ bdrv_flags |= BDRV_O_NOCACHE;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor