From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO8Ch-0001DM-N8 for qemu-devel@nongnu.org; Fri, 05 Apr 2013 11:05:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO8Cb-0006pP-2C for qemu-devel@nongnu.org; Fri, 05 Apr 2013 11:05:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO8Ca-0006pG-RU for qemu-devel@nongnu.org; Fri, 05 Apr 2013 11:05:17 -0400 Message-ID: <515EE826.2040201@redhat.com> Date: Fri, 05 Apr 2013 17:05:10 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1365169560-11012-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1365169560-11012-1-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] main-loop: drop the BQL if the I/O appears to be spinning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , qemu-devel Il 05/04/2013 15:46, Anthony Liguori ha scritto: > The char-flow refactoring introduced a busy-wait that depended on > an action from the VCPU thread. However, the VCPU thread could > never take that action because the busy-wait starved the VCPU thread > of the BQL because it never dropped the mutex while running select. > > Paolo doesn't want to drop this optimization for fear that we will > stop detecting these busy waits. I'm afraid to keep this optimization > even with the busy-wait fixed because I think a similar problem can > occur just with heavy I/O thread load manifesting itself as VCPU pauses. > > As a compromise, introduce an artificial timeout after a thousand > iterations but print a rate limited warning when this happens. This > let's us still detect when this condition occurs without it being > a fatal error. Good idea, thanks! Paolo