On 01/20/2010 10:35 AM, Sheng Yang wrote:
The default action of calesced MMIO is, cache the writing in buffer, until: 1. The buffer is full. 2. Or the exit to QEmu due to other reasons. But this would result in a very late writing in some condition. 1. The each time write to MMIO content is small. 2. The writing interval is big. 3. No need for input or accessing other devices frequently. This issue was observed in a experimental embbed system. The test image simply print "test" every 1 seconds. The output in QEmu meets expectation, but the output in KVM is delayed for seconds. To solve this issue, a timeout is added, to ensure userspace exit freqency is high enough(mostly target for video now) to write the buffered MMIO data. Current the maximum exit interval is 1/25s(so 25 times exit to userspace per second at least, pretty low compared to normal environment), and reused KVM_EXIT_IRQ_WINDOW_OPEN as exit reason, for it would doing nothing at all in userspace handler.
This can be done from userspace, by scheduling a SIGALRM in the desired frequency. This way, userspace has control over the update frequency (for example, if the SDL window is minimized or VNC is disconnected, we don't need to poll).
I think we can even do this from the I/O thread, without stopping a vcpu, since the colaesced mmio page is not tied to a vcpu but is a vm property.
-- error compiling committee.c: too many arguments to function -- 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