From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPVCV-0005B6-Ap for qemu-devel@nongnu.org; Wed, 12 Aug 2015 08:32:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPVCS-0006D6-5q for qemu-devel@nongnu.org; Wed, 12 Aug 2015 08:32:11 -0400 Received: from greensocs.com ([193.104.36.180]:46187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPVCR-0006D0-V2 for qemu-devel@nongnu.org; Wed, 12 Aug 2015 08:32:08 -0400 Message-ID: <55CB3CC3.7000700@greensocs.com> Date: Wed, 12 Aug 2015 14:32:03 +0200 From: Frederic Konrad MIME-Version: 1.0 References: <1439220437-23957-1-git-send-email-fred.konrad@greensocs.com> <1439220437-23957-10-git-send-email-fred.konrad@greensocs.com> <55C8CE36.1070208@redhat.com> <8737zph9dy.fsf@linaro.org> <55CA6A6E.9030205@greensocs.com> <55CB18D5.2020709@redhat.com> In-Reply-To: <55CB18D5.2020709@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , =?UTF-8?B?QWxleCBCZW5uw6ll?= Cc: mttcg@greensocs.com, qemu-devel@nongnu.org, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, guillaume.delbergue@greensocs.com On 12/08/2015 11:58, Paolo Bonzini wrote: > > On 11/08/2015 23:34, Frederic Konrad wrote: >>> Also if qemu_cond_broadcast(&qemu_io_proceeded_cond) is being dropped >>> there is no point keeping the guff around in qemu_tcg_wait_io_event. >>> >> Yes good point. >> >> BTW this leads to high consumption of host CPU eg: 100% per VCPU thread as >> the VCPUs thread are no longer waiting for qemu_io_proceeded_cond. > If the guest CPU is busy waiting, that's expected. But if the guest CPU > is halted, it should not have 100% host CPU consumption. > > Paolo > Hmm so that's definitely strange... I mean theorically it's the same as before? An other thing. It seems that we need to signal the VCPU when the iothread take the lock eg: if (tcg_enabled() && qemu_thread_is_self(&io_thread)) { CPU_FOREACH(cpu) { cpu_exit(cpu); } } To make this patch working without MTTCG. Fred