From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTcis-00062J-FF for qemu-devel@nongnu.org; Tue, 08 Oct 2013 15:13:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTcik-0005yc-1N for qemu-devel@nongnu.org; Tue, 08 Oct 2013 15:13:34 -0400 Received: from mail-ea0-x233.google.com ([2a00:1450:4013:c01::233]:56283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTcij-0005yW-Pm for qemu-devel@nongnu.org; Tue, 08 Oct 2013 15:13:25 -0400 Received: by mail-ea0-f179.google.com with SMTP id b10so4218988eae.10 for ; Tue, 08 Oct 2013 12:13:25 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <52545950.5070403@redhat.com> Date: Tue, 08 Oct 2013 21:13:20 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1381259403-7386-1-git-send-email-hdegoede@redhat.com> In-Reply-To: <1381259403-7386-1-git-send-email-hdegoede@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hans de Goede Cc: qemu-devel@nongnu.org, Alex Bligh 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