On Tue, Mar 15, 2011 at 1:13 PM, Anthony Liguori <aligu...@us.ibm.com> wrote: > Why even bothering signaling for completion with the virtio-9p threadpool? > > There's no sane guest that's going to poll on virtio-9p completion with > interrupts disabled and no timer. Once we enable the I/O thread by default, > it won't even be necessary for the paio layer.
It's not just about preventing livelock under extreme cases. If you omit the signal then !CONFIG_IOTHREAD builds will see increased latency because virtfs request completion will piggy-back on other events that *do* interrupt the vcpu. I'm no fan of !CONFIG_IOTHREAD but skipping signals is currently bad practice and will continue to be until CONFIG_IOTHREAD is removed entirely. The proper solution would be a thin abstraction for thread-safe notification that compiles out signals when CONFIG_IOTHREAD is used. Then we have one place in QEMU that does signalling correctly and we can optimize it or remove CONFIG_IOTHREAD completely without having the burden of duplicating this code in several places. Stefan