[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHR
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD |
Date: |
Tue, 15 Feb 2011 19:58:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2011-02-15 18:54, Marcelo Tosatti wrote:
>
> Note: to be applied to uq/master.
>
> In icount mode, halt emulation should take into account the nearest event
> when sleeping.
>
> Signed-off-by: Marcelo Tosatti <address@hidden>
> Reported-and-tested-by: "Edgar E. Iglesias" <address@hidden>
>
> diff --git a/cpus.c b/cpus.c
> index 468544c..21c3eba 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -770,7 +770,7 @@ static void qemu_tcg_wait_io_event(void)
> CPUState *env;
>
> while (all_cpu_threads_idle()) {
> - qemu_cond_timedwait(tcg_halt_cond, &qemu_global_mutex, 1000);
> + qemu_cond_timedwait(tcg_halt_cond, &qemu_global_mutex,
> qemu_calculate_timeout());
checkpatch.pl would complain here.
More important: Paolo was proposing patches to eliminate all those fishy
cond_wait timeouts. That's probably the better way to go. The timeouts
only paper over missing signaling.
> }
>
> qemu_mutex_unlock(&qemu_global_mutex);
> diff --git a/vl.c b/vl.c
> index b436952..8ba7e9d 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1335,7 +1335,7 @@ void main_loop_wait(int nonblocking)
> if (nonblocking)
> timeout = 0;
> else {
> - timeout = qemu_calculate_timeout();
> + timeout = 1000;
> qemu_bh_update_timeout(&timeout);
> }
>
Isn't this path also relevant for !IOTHREAD? What's the impact of this
change for that configuration?
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
- [Qemu-devel] [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD, Marcelo Tosatti, 2011/02/15
- [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD,
Jan Kiszka <=
- [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD, Marcelo Tosatti, 2011/02/15
- [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD, Jan Kiszka, 2011/02/15
- [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD, Marcelo Tosatti, 2011/02/15
- [Qemu-devel] [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD (v2), Marcelo Tosatti, 2011/02/15
- [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD (v2), Jan Kiszka, 2011/02/16
- [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD (v2), Paolo Bonzini, 2011/02/16
- [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD (v2), Jan Kiszka, 2011/02/16
- [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD (v2), Paolo Bonzini, 2011/02/16
- [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD (v2), Jan Kiszka, 2011/02/16
- [Qemu-devel] Re: [PATCH] fix halt emulation with icount and CONFIG_IOTHREAD (v2), Paolo Bonzini, 2011/02/16