qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush
Date: Wed, 12 May 2010 11:43:51 +0100

On Wed, May 12, 2010 at 10:42 AM, Jamie Lokier <address@hidden> wrote:
> Stefan Hajnoczi wrote:
>> Why add a nop AIO operation instead of setting
>> BlockDriverState->enable_write_cache to zero?  In that case no write
>> cache would be reported to the guest (just like cache=writethrough).
>
> Hmm.  If the guest sees write cache absent, that prevents changing the
> cache policy on the host later (from not flushing to flushing), which
> you might want to do after an OS install has finished and booted up.

Right.  There are 3 cases from the guest perspective:

1. Disable write cache or no write cache.  Flushing not needed.
2. Disable flushing but leave write cache enabled.
3. Enable write cache and use flushing.

When we don't report a write cache at all, the guest is always stuck at 1.

If you're going to do this for installs and other temporary workloads,
then enabling the write cache again isn't an issue.  After installing
successfully, restart the guest with a sane cache= mode.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]