δΊ 2012-8-29 19:11, Paolo Bonzini ει:
Il 29/08/2012 13:05, Wenchao Xia ha scritto:
+ printf("checking aio status for %d times.\n", check_times);
+ while (true == qb_aio_check(broker)) {
+ check_times++;
+ usleep(1);
+ }
+
Busy waiting is not acceptable, and this is the reason why I had
suggested to keep AIO out of the design for now.
You need to provide an implementation of AIO for either glib or
something else, but this is best done within QEMU first (and only later
moved to libqblock).
It is similar to qemu's "select" type of AIO, while (true ==
qb_aio_check(broker) is not neccessary but an example here
to ensure write i/o is executed first.
Do you mean qemu's aio should be improved to another type of
AIO API instead of select type? which kind of AIO api is preferred?
Paolo
--
Best Regards
Wenchao Xia