> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo 
> Bonzini
> On 23/09/2015 09:22, Pavel Dovgaluk wrote:
> > Sometimes tcg thread halts in qemu_tcg_wait_io_event function,
> > waiting for any external event. Virtual clock does not run, because
> > warp is not called. warp call in main_loop_wait proceeds virtual
> > clock and allows tcg thread to run further.
> 
> Ok, this makes sense!
> 
> Would this work too as a replacement for this patch?

No, it doesn't help.
It seems that tcg is waiting within qemu_cond_wait function without leaving it.

> 
> diff --git a/cpus.c b/cpus.c
> index fbbd17f..9480acc 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -926,6 +926,7 @@ static void qemu_tcg_wait_io_event(CPUState *cpu)
>      }
> 
>      while (iothread_requesting_mutex) {
> +        qemu_clock_warp(QEMU_CLOCK_VIRTUAL);
>          qemu_cond_wait(&qemu_io_proceeded_cond, &qemu_global_mutex);
>      }


Pavel Dovgalyuk


Reply via email to