kvm caches and battery-backed RAID

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

 



Hello. I have battery-backed RAID on my host machine. So I want to
choose appropriate caching mode for KVM. I use lvm volumes as raw
disks. So, I have composed table (while looking to sources):

-----------------------------------------------
              NOCACHE      CACHE_WB    NO_FLUSH
writethrough    -             -            -
writeback       -            YES           -
unsafe          -            YES          YES
off=none       YES           YES           -
directsync     YES            -            -
-----------------------------------------------

As I have battery-backed RAID (with HDDs set in writethrough mode), I
do not need any flushes, so, only one cache mode appropriate -
"unsafe". But it uses host cache, this is not what I want. Why not to
add caching mode named "bbdevice" as acronym of "battery backed
device", which should maps to all three flags:
BDRV_O_NOCACHE|BDRV_CACHE_WB|BDRV_NO_FLUSH?

This mode will be optimal for any battery-backed devices since battery
guarantee prevent data loss. Even when writes interleaved in another
order, this is OK. This is fast and safe.

I can create patch if my thoughts are correct.

Also, did I correctly undestand flags:

NOCACHE: do not use host cache.
CACHE_WB: do no sync generic writes.
NO_FLUSH: do not sync even if guest request this.

Also, is it possible that KVM reports to guest that write operation is
complete, but write operation was not complete at host? (I mean raw
format for virtual disk)

-- 
Segmentation fault
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux