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

Anthony Liguori
2008-04-15T15:34:15Z

Marcelo Tosatti wrote:
> On Tue, Apr 15, 2008 at 05:45:28PM +0300, Avi Kivity wrote:
>
>> Anthony Liguori wrote:
>>
>>> Why did we ever need sigtimedwait() anyway? Even if we were
>>> select()ing within the VCPU context, we should break out of the
>>> select() on signal delivery.
>>>
>>>
>> select() is no good since if the signal is delivered after the select(),
>> but before entry into guest mode, it is lost. pselect() might work, but
>> its is not supported on all hosts, and it (AFAICT) delivers the signals
>> by calling their handlers, which is slow and unnecessary.
>>
>
> Anthony tested a patch using signalfd:
>
> http://people.redhat.com/~mtosatti/io-thread-select-timeout
>
> Which is only available on newer hosts. I guess the signals will have to
> stay for older hosts.
>

With the IO thread, we don't have to worry about lost signals like we do
in a VCPU thread so it's fine to just use select() and install signal
handlers IIUC.

Regards,

Anthony Liguori