From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQbB2-0001uT-EP for qemu-devel@nongnu.org; Tue, 02 Feb 2016 08:39:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQbAz-00069q-8t for qemu-devel@nongnu.org; Tue, 02 Feb 2016 08:39:28 -0500 Received: from david.siemens.de ([192.35.17.14]:37814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQbAy-00069e-VN for qemu-devel@nongnu.org; Tue, 02 Feb 2016 08:39:25 -0500 References: From: Jan Kiszka Message-ID: <56B0B189.1000306@siemens.com> Date: Tue, 2 Feb 2016 14:39:21 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] vl.c:main_loop() non-blocking TCG optimization still useful? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel On 2016-02-02 14:29, Stefan Hajnoczi wrote: > Hi Jan, > In 2011 the following patch was merged to optimize I/O vs vcpu scheduling: > > commit c9f711a5d31e22dac932c1c01e9c0f97caff0988 > Author: Jan Kiszka > Date: Mon Aug 22 17:46:02 2011 +0200 > > Poll main loop after I/O events were received > > This was back in the days of CONFIG_IOTHREAD. Things have changed > quite a bit since then. > > Do you think the last_io/non-blocking trick is still needed today in TCG? The problem back then was the lock-step between io-thread and vcpus thread: if the iothread polled with the option to block, the vcpus thread got kicked again because the common lock was released to it. But if the iothread did not block because of further pending io, it would have to kick the vcpus thread immediately out of its emulation loop again. This meant no progress for the vcpus, only sync ping-pong. If this changed now (I lost a bit track), the need for this trick might be gone. Maybe try the setup I described and measure the boot time of an SMP guest with and without this trick. Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux