On Mon, Apr 01, 2013 at 01:21:45PM +0000, Alex Bligh wrote: > I'd like to experiment with adding persistent writeback cache to qemu. > The use case here is where non-local storage is used (e.g. rbd, ceph) > using the qemu drivers, together with a local cache as a file on > a much faster locally mounted device, for instance an SSD (possibly > replicated). This would I think give a similar performance boost to > using an rbd block device plus flashcache/dm-cache/bcache, but without > introducing all the context switches and limitations of having to > use real block devices. I appreciate it would need to be live migration > aware (worst case solution: flush and turn off caching during live > migrate), and ideally be capable of replaying a dirty writeback cache > in the event the host crashes. > > Is there any support for this already? Has anyone worked on this before? > If not, would there be any interest in it?
I'm concerned about the complexity this would introduce in QEMU. Therefore I'm a fan of using existing solutions like the Linux block layer instead of reimplementing this stuff in Linux. What concrete issues are there with using rbd plus flashcache/dm-cache/bcache? I'm not sure I understand the context switch problem since implementing it in user space will still require system calls to do all the actual cache I/O. Stefan