[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive |
Date: |
Tue, 11 May 2010 17:18:29 +0200 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
Paul Brook wrote:
>>> What about another cache=... value instead of adding more options? I'm
>>> quite sure you'll only ever need this with writeback caching. So we
>>> could have cache=none|writethrough|writeback|wb-noflush or something
>>> like that.
>>>
>
> I agree.
>
>
>> The cache option really isn't too useful. There's a matrix of 3x2
>> possible I/O modes for the posix backend, and right now we only expose
>> two of them. I think we really should expose all of them, split into
>> two options:
>>
>> caching
>>
>> | normal | O_DIRECT |
>>
>> --------+--------------------+--------------------+
>> none | - | - |
>> integrity O_DSYNC | cache=writeback | - |
>> fsync | cache=writethrough | cache=none |
>> --------+--------------------+--------------------+
>>
>
> I think this table is misleading, and from a user perspective there are only
> 4
> interesting combinations:
>
> cache=none:
> No host caching. Reads and writes both go directly to underlying storage.
> Useful to avoid double-caching.
>
> cache=writethrough
> Reads are cached. Writes go directly to underlying storage. Useful for
> broken guests that aren't aware of drive caches.
>
> cache=writeback
> Reads and writes are cached. Guest flushes are honoured. Note that this may
> include a guest visible knob that allows the write cache to be disabled. If
> the guest requests the cache be disabled then this should act the same as
> cache=writethrough. Closest to how real hardware works.
>
> cache=always (or a more scary name like cache=lie to defend against idiots)
> Reads and writes are cached. Guest flushes are ignored. Useful for dumb
> guests in non-critical environments.
>
How about cache=insecure?
But I agree. Having that as a cache= option seems to be the easiest way
to expose it to a user.
Alex
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, (continued)
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Anthony Liguori, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Paul Brook, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Anthony Liguori, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Paul Brook, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Anthony Liguori, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Paul Brook, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Avi Kivity, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Jamie Lokier, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Anthony Liguori, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Jamie Lokier, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive,
Alexander Graf <=
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Jamie Lokier, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Paul Brook, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Paul Brook, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Jamie Lokier, 2010/05/12
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Christoph Hellwig, 2010/05/17
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Markus Armbruster, 2010/05/14
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Christoph Hellwig, 2010/05/17
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Alexander Graf, 2010/05/17
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Avi Kivity, 2010/05/11
- [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Alexander Graf, 2010/05/12