[PR #13] fix QED flush: QED did not perform proper flush #26

Open
opened 2026-01-31 21:29:25 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/qemu/qemu/pull/13

State: closed
Merged: No


Sorry I misunderstood qed... Please ignore this request!!

fix QED flush: QED did not perform proper flush on synchronized write or flush, at least one flush method should be provided (common/co/aio)'

I was doing "sync write" benchmarking on varies qemu supported formats (on ssd). I was surprised that QED shows significant high performance over several other formats (qcow2/vmdk/vdi..). In some testcases QED even runs a little bit faster than raw format!

After careful reading of the code I found QED skipped the necessary flush by providing nothing on flush api. unlike read/write which require at least one type of implementation, flush API is not mandatory in API because your format could guarantee that synchronization is done in write path. However that's not the case in QED because data is buffered in the backing file and need proper flush to make it safe.

However I'm not a skilled qemu developer. Above is what I got from my thinking and study. Please correct me if I misunderstood the system.

Thanks!
Xingbo
(It's quite a hard work to go through the long callback chain, though much easier that tcg's heavy use of glue macros...)

**Original Pull Request:** https://github.com/qemu/qemu/pull/13 **State:** closed **Merged:** No --- Sorry I misunderstood qed... Please ignore this request!! fix QED flush: QED did not perform proper flush on synchronized write or flush, at least one flush method should be provided (common/co/aio)' I was doing "sync write" benchmarking on varies qemu supported formats (on ssd). I was surprised that QED shows significant high performance over several other formats (qcow2/vmdk/vdi..). In some testcases QED even runs a little bit faster than raw format! After careful reading of the code I found QED skipped the necessary flush by providing nothing on _flush_ api. unlike read/write which require at least one type of implementation, flush API is not mandatory in API because your format could guarantee that synchronization is done in write path. However that's not the case in QED because data is buffered in the backing file and need proper flush to make it safe. However I'm not a skilled qemu developer. Above is what I got from my thinking and study. Please correct me if I misunderstood the system. Thanks! Xingbo (It's quite a hard work to go through the long callback chain, though much easier that tcg's heavy use of glue macros...)
claunia added the pull-request label 2026-01-31 21:29:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/qemu#26