From patchwork Fri Mar 16 12:25:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 147195 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 330F9B6EF4 for ; Fri, 16 Mar 2012 23:26:49 +1100 (EST) Received: from localhost ([::1]:51684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8WF5-00087m-Ak for incoming@patchwork.ozlabs.org; Fri, 16 Mar 2012 08:26:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8WEc-0007tP-41 for qemu-devel@nongnu.org; Fri, 16 Mar 2012 08:26:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8WEM-0003YT-Mq for qemu-devel@nongnu.org; Fri, 16 Mar 2012 08:26:17 -0400 Received: from goliath.siemens.de ([192.35.17.28]:29526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8WEM-0003Y8-Ct for qemu-devel@nongnu.org; Fri, 16 Mar 2012 08:26:02 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id q2GCPtjE018312; Fri, 16 Mar 2012 13:25:56 +0100 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id q2GCPt3o008329; Fri, 16 Mar 2012 13:25:55 +0100 Message-ID: <4F633153.9030004@siemens.com> Date: Fri, 16 Mar 2012 13:25:55 +0100 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Anthony Liguori , qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 192.35.17.28 Cc: Marek Vasut , Paolo Bonzini Subject: [Qemu-devel] [PATCH] Kick io-thread on qemu_chr_accept_input 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Once a chr frontend is able to receive input again, we need to inform the io-thread about this fact. Otherwise, main_loop_wait may continue to select without the related backend file descriptor in its set. This can cause high input latencies if only low-rate events arrive otherwise. Signed-off-by: Jan Kiszka --- /me wonders if a similar issue explains the slirp slowness under KVM with in-kernel irqchip enabled. Need to check... qemu-char.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 9a5be75..a589a84 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -177,6 +177,7 @@ void qemu_chr_accept_input(CharDriverState *s) { if (s->chr_accept_input) s->chr_accept_input(s); + qemu_notify_event(); } void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)