Received: from eggs.gnu.org ([2001:4830:134:3::10]:57347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhUCx-0005n1-AB for qemu-devel@nongnu.org; Wed, 07 Sep 2016 00:11:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhUCt-0005ea-1Z for qemu-devel@nongnu.org; Wed, 07 Sep 2016 00:11:30 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:33431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhUCs-0005eW-Qf for qemu-devel@nongnu.org; Wed, 07 Sep 2016 00:11:26 -0400 Received: by mail-pf0-x244.google.com with SMTP id 128so255132pfb.0 for ; Tue, 06 Sep 2016 21:11:26 -0700 (PDT) Sender: Richard Henderson References: <1470929064-4092-1-git-send-email-alex.bennee@linaro.org> <1470929064-4092-19-git-send-email-alex.bennee@linaro.org> From: Richard Henderson Message-ID: <5cf65720-efba-082a-5163-fb6272aec64e@twiddle.net> Date: Tue, 6 Sep 2016 21:11:24 -0700 MIME-Version: 1.0 In-Reply-To: <1470929064-4092-19-git-send-email-alex.bennee@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC v4 18/28] tcg: remove global exit_request List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , mttcg@greensocs.com, qemu-devel@nongnu.org, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, cota@braap.org, bobby.prani@gmail.com, nikunj@linux.vnet.ibm.com Cc: peter.maydell@linaro.org, claudio.fontana@huawei.com, Peter Crosthwaite , jan.kiszka@siemens.com, mark.burton@greensocs.com, serge.fdrv@gmail.com, pbonzini@redhat.com On 08/11/2016 08:24 AM, Alex Bennée wrote: > There are now only two uses of the global exit_request left. > > The first ensures we exit the run_loop when we first start to process > pending work and in the kick handler. This is just as easily done by > setting the first_cpu->exit_request flag. > > The second use is in the round robin kick routine. The global > exit_request ensured every vCPU would set its local exit_request and > cause a full exit of the loop. Now the iothread isn't being held while > running we can just rely on the kick handler to push us out as intended. > > We lightly re-factor the main vCPU thread to ensure cpu->exit_requests > cause us to exit the main loop and process any IO requests that might > come along. > > Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson r~