From patchwork Fri Feb 4 15:47:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 81920 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B4E73B7131 for ; Sat, 5 Feb 2011 03:59:55 +1100 (EST) Received: from localhost ([127.0.0.1]:47518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlOEO-0007u0-Rg for incoming@patchwork.ozlabs.org; Fri, 04 Feb 2011 11:09:56 -0500 Received: from [140.186.70.92] (port=51794 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlNux-00063a-J3 for qemu-devel@nongnu.org; Fri, 04 Feb 2011 10:49:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PlNus-0007xy-CI for qemu-devel@nongnu.org; Fri, 04 Feb 2011 10:49:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PlNus-0007xB-5L for qemu-devel@nongnu.org; Fri, 04 Feb 2011 10:49:46 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p14Fnj3s019009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Feb 2011 10:49:45 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p14Fnjd8001031; Fri, 4 Feb 2011 10:49:45 -0500 Received: from amt.cnet (vpn2-8-97.ams2.redhat.com [10.36.8.97]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p14FnhrR002223; Fri, 4 Feb 2011 10:49:44 -0500 Received: from amt.cnet (localhost.localdomain [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 73CA665202A; Fri, 4 Feb 2011 13:47:49 -0200 (BRST) Received: (from marcelo@localhost) by amt.cnet (8.14.4/8.14.4/Submit) id p14FljtG017670; Fri, 4 Feb 2011 13:47:45 -0200 From: Marcelo Tosatti To: Anthony Liguori Date: Fri, 4 Feb 2011 13:47:07 -0200 Message-Id: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH 04/23] Trigger exit from cpu_exec_all on pending IO events X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka Except for timer events, we currently do not leave the loop over all VCPUs if an IO event was filed. That may cause unexpected IO latencies under !CONFIG_IOTHREAD in SMP scenarios. Fix it by setting the global exit_request which breaks the loop. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- cpus.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index ceb3a83..5dfc54e 100644 --- a/cpus.c +++ b/cpus.c @@ -315,6 +315,7 @@ void qemu_notify_event(void) if (next_cpu && env != next_cpu) { cpu_exit(next_cpu); } + exit_request = 1; } void qemu_mutex_lock_iothread(void) {}