qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when ma


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events
Date: Tue, 08 Oct 2013 21:13:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 08/10/2013 21:10, Hans de Goede ha scritto:
> @@ -480,6 +480,11 @@ int main_loop_wait(int nonblocking)
>                                        timerlistgroup_deadline_ns(
>                                            &main_loop_tlg));
>  
> +    /* When not non-blocking always allow io-threads to acquire the lock */
> +    if (timeout != 0 && timeout_ns == 0) {
> +        timeout_ns = 1;
> +    }
> +

This _is_ an I/O thread, so I guess this should be changed to "other
threads".  Also, perhaps timeout_ns can be changed to a higher value
such as 250 us that were used up to the offending commit?

Otherwise looks good!

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]