[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: |
Paul Brook |
Subject: |
Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive |
Date: |
Tue, 11 May 2010 13:15:08 +0100 |
User-agent: |
KMail/1.13.3 (Linux/2.6.33-2-amd64; KDE/4.4.3; x86_64; ; ) |
> > 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.
IMO the other boxes in your table (disable cache but require guest flushes)
don't make any sense.
Paul
- [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush, Alexander Graf, 2010/05/10
- [Qemu-devel] [PATCH 1/2] Add no-op aio emulation stub, Alexander Graf, 2010/05/10
- [Qemu-devel] [PATCH 2/2] Add flush=off parameter to -drive, Alexander Graf, 2010/05/10
- [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Kevin Wolf, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Christoph Hellwig, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive,
Paul Brook <=
- 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, 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