Re: [patch 2/2] QEMU: decrease console "refresh rate" with -nographic

Anthony Liguori
2008-04-14T18:31:31Z

Marcelo Tosatti wrote:
> On Mon, Apr 14, 2008 at 07:24:06PM +0300, Avi Kivity wrote:
>
>>> Issue is that the dumb console timer "wakes up" the vcpu to do IO
>>> processing in main_loop_wait().
>>>
>>> So while you're right that vga_hw_update() is a no-op for the -nographic
>>> case, the indirect effect of the timer triggering main_loop_wait() is
>>> needed for reading input from stdio in a way that feels interactive for
>>> the user.
>>>
>>>
>>>
>> Why not enable SIGIO on stdio input, like the rest of the fd handling in
>> qemu?
>>
>
> Thats a possibility, but I think we've now agreed that doing select() with a
> timeout is cleaner and possibly half a cent faster.
>

BTW, when we set O_ASYNC on the tap fd, we're eliminating O_NONBLOCK.
This means that we have to poll loop select() when readv()'ing packets
instead of just reading until hitting AGAIN. This means at least an
extra syscall per packet.

Regards,

Anthony Liguori