From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO6Gv-0004F4-TO for qemu-devel@nongnu.org; Fri, 05 Apr 2013 09:01:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO6Go-0005jm-58 for qemu-devel@nongnu.org; Fri, 05 Apr 2013 09:01:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO6Gn-0005hx-Tf for qemu-devel@nongnu.org; Fri, 05 Apr 2013 09:01:30 -0400 Message-ID: <515ECB20.2020203@redhat.com> Date: Fri, 05 Apr 2013 15:01:20 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1365147607-18298-1-git-send-email-pbonzini@redhat.com> <87ip41f88g.fsf@codemonkey.ws> In-Reply-To: <87ip41f88g.fsf@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-char: eliminate busy waiting on can_read returning zero List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: amit.shah@redhat.com, peter.crosthwaite@xilinx.com, qemu-devel@nongnu.org, gson@gson.org Il 05/04/2013 14:54, Anthony Liguori ha scritto: > I guess this works with migration because we assume that after migration > the main loop will do a complete run? Yes, migration will terminate in an fd handler, and the next round of the main loop will re-evaluate chr_read. > Is this a safe assumption or does > there need to be a qemu_notify_event() somewhere after migration to make > sure this doesn't cause a hang? There could be a qemu_chr_accept_input() for all character devices after migration. I think that would be a separate patch. Regarding the need or not for Peter's patch: the patch might be needed this kind of busy-wait fix was required often. As far as I recall, this is the first we ever had, and it came after an almost-complete rewrite. It seems rare enough, that it's much better to fix the root causes when they appear---not the symptoms. Paolo