On 2016-02-02 14:29, Stefan Hajnoczi wrote:
> Hi Jan,
> In 2011 the following patch was merged to optimize I/O vs vcpu scheduling:
> 
> commit c9f711a5d31e22dac932c1c01e9c0f97caff0988
> Author: Jan Kiszka <jan.kis...@siemens.com>
> Date:   Mon Aug 22 17:46:02 2011 +0200
> 
>     Poll main loop after I/O events were received
> 
> This was back in the days of CONFIG_IOTHREAD.  Things have changed
> quite a bit since then.
> 
> Do you think the last_io/non-blocking trick is still needed today in TCG?

The problem back then was the lock-step between io-thread and vcpus
thread: if the iothread polled with the option to block, the vcpus
thread got kicked again because the common lock was released to it. But
if the iothread did not block because of further pending io, it would
have to kick the vcpus thread immediately out of its emulation loop
again. This meant no progress for the vcpus, only sync ping-pong.

If this changed now (I lost a bit track), the need for this trick might
be gone. Maybe try the setup I described and measure the boot time of an
SMP guest with and without this trick.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

Reply via email to