From patchwork Thu Mar 13 20:47:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 26216 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C553C203AC for ; Thu, 13 Mar 2014 20:48:25 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf5282949iec.2 for ; Thu, 13 Mar 2014 13:48:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=d0cuUhBMb6EjLN3xDJYGfRwmOzrzo5MifqCk2zEw+ks=; b=TgCT0DlTrFQMsH0ASOQivQMwG2+g+TDepEJJXuq++suxtPMvkRt8bb1dTxfPj5wYIP oW1KETyNoQ8KD6ZGfQXT3DErlVoKYazH93g2ECZjLqgGwJJMT+HtdwPQcRPU8SCX5XMv 23yKoUMV+7+0d5pRgceWXjLYLa5SBOSdOhA4/+mi/qXgxVEgXV3T8NIBz3Jy1l+OSmId kz+UZysBSQGcyD5fd/f11MvzzkhEA2QkDITOYKW8eholao70gcAxCYjRfXkfGtbEJU5J TlIAO3VbCpOmSCcD7nmb4nUvLM5g5a/551bhAdz0rh084JEiRzoEIxI4H3w9veb2dxtD cuxw== X-Gm-Message-State: ALoCoQkotQ8NKm6T2ZL4vRl2+2ULeC4gdjIXKPyaYwWSp2pR6VmHuQ5uyse8F6MfwIi3itUlkXQr X-Received: by 10.182.17.69 with SMTP id m5mr1554132obd.6.1394743705152; Thu, 13 Mar 2014 13:48:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.161 with SMTP id o30ls469608qga.94.gmail; Thu, 13 Mar 2014 13:48:25 -0700 (PDT) X-Received: by 10.220.250.203 with SMTP id mp11mr3056615vcb.2.1394743705067; Thu, 13 Mar 2014 13:48:25 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id f7si1254444vcz.57.2014.03.13.13.48.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 13:48:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu19so1768505vcb.15 for ; Thu, 13 Mar 2014 13:48:25 -0700 (PDT) X-Received: by 10.58.170.69 with SMTP id ak5mr2724638vec.28.1394743704971; Thu, 13 Mar 2014 13:48:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp4108vck; Thu, 13 Mar 2014 13:48:24 -0700 (PDT) X-Received: by 10.224.53.198 with SMTP id n6mr5184587qag.41.1394743704586; Thu, 13 Mar 2014 13:48:24 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a59si2082215qge.39.2014.03.13.13.48.24 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 13 Mar 2014 13:48:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:41556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOCYC-0001T3-3J for patch@linaro.org; Thu, 13 Mar 2014 16:48:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOCXL-0000Xd-GF for qemu-devel@nongnu.org; Thu, 13 Mar 2014 16:47:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOCXG-0000vZ-47 for qemu-devel@nongnu.org; Thu, 13 Mar 2014 16:47:31 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39060 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOCXF-0000vM-TF for qemu-devel@nongnu.org; Thu, 13 Mar 2014 16:47:26 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 667BB7501C; Thu, 13 Mar 2014 20:47:25 +0000 (UTC) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Thu, 13 Mar 2014 21:47:15 +0100 Message-Id: <1394743636-23848-5-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1394743636-23848-1-git-send-email-afaerber@suse.de> References: <1394743636-23848-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.135.220.15 Cc: Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PULL for-2.0 4/4] main-loop: Suppress "I/O thread spun" warnings for qtest X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Peter Maydell When running under qtest we don't actually have any vcpu threads to be starved, so the warning about the I/O thread spinning isn't relevant, and the way qtest manipulates the simulated clock means the warning is produced a lot as a false positive. Suppress it if qtest_enabled(), so 'make check' output is less noisy. Signed-off-by: Peter Maydell Reviewed-by: Stefan Hajnoczi Signed-off-by: Andreas Färber --- main-loop.c | 3 ++- stubs/Makefile.objs | 1 + stubs/qtest.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 stubs/qtest.c diff --git a/main-loop.c b/main-loop.c index c3c9c28..8a85493 100644 --- a/main-loop.c +++ b/main-loop.c @@ -25,6 +25,7 @@ #include "qemu-common.h" #include "qemu/timer.h" #include "qemu/sockets.h" // struct in_addr needed for libslirp.h +#include "sysemu/qtest.h" #include "slirp/libslirp.h" #include "qemu/main-loop.h" #include "block/aio.h" @@ -208,7 +209,7 @@ static int os_host_main_loop_wait(int64_t timeout) if (!timeout && (spin_counter > MAX_MAIN_LOOP_SPIN)) { static bool notified; - if (!notified) { + if (!notified && !qtest_enabled()) { fprintf(stderr, "main-loop: WARNING: I/O thread spun for %d iterations\n", MAX_MAIN_LOOP_SPIN); diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index df3aa7a..59c5a54 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -18,6 +18,7 @@ stub-obj-y += mon-print-filename.o stub-obj-y += mon-protocol-event.o stub-obj-y += mon-set-error.o stub-obj-y += pci-drive-hot-add.o +stub-obj-y += qtest.o stub-obj-y += reset.o stub-obj-y += set-fd-handler.o stub-obj-y += slirp.o diff --git a/stubs/qtest.c b/stubs/qtest.c new file mode 100644 index 0000000..e671ed8 --- /dev/null +++ b/stubs/qtest.c @@ -0,0 +1,14 @@ +/* + * qtest stubs + * + * Copyright (c) 2014 Linaro Limited + * Written by Peter Maydell + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu-common.h" + +/* Needed for qtest_allowed() */ +bool qtest_allowed;