Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O77F1-0001qN-A1 for qemu-devel@nongnu.org; Wed, 28 Apr 2010 09:23:51 -0400 Received: from [140.186.70.92] (port=40441 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O77Ew-0001pc-0T for qemu-devel@nongnu.org; Wed, 28 Apr 2010 09:23:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O77Eu-0001rI-J7 for qemu-devel@nongnu.org; Wed, 28 Apr 2010 09:23:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49888) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O77Eu-0001q1-BI for qemu-devel@nongnu.org; Wed, 28 Apr 2010 09:23:44 -0400 Date: Wed, 28 Apr 2010 12:59:21 +0530 From: Amit Shah Message-ID: <20100428072921.GT27314@amit-x200.redhat.com> References: <1272371652-23087-11-git-send-email-amit.shah@redhat.com> <1272371652-23087-12-git-send-email-amit.shah@redhat.com> <1272371652-23087-13-git-send-email-amit.shah@redhat.com> <1272371652-23087-14-git-send-email-amit.shah@redhat.com> <1272371652-23087-15-git-send-email-amit.shah@redhat.com> <1272371652-23087-16-git-send-email-amit.shah@redhat.com> <1272371652-23087-17-git-send-email-amit.shah@redhat.com> <1272371652-23087-18-git-send-email-amit.shah@redhat.com> <1272371652-23087-19-git-send-email-amit.shah@redhat.com> <4BD721C7.8010102@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BD721C7.8010102@codemonkey.ws> Subject: [Qemu-devel] Re: [PATCH v6 18/18] virtio-serial-bus: wake up iothread upon guest read notification List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Marcelo Tosatti , qemu list , Juan Quintela On (Tue) Apr 27 2010 [12:41:27], Anthony Liguori wrote: > On 04/27/2010 07:34 AM, Amit Shah wrote: >> From: Marcelo Tosatti >> >> Wake up iothread when buffers are consumed. >> >> Signed-off-by: Marcelo Tosatti >> Signed-off-by: Amit Shah >> > > What's the race here? This looks very odd to me. When the guest indicates it has added buffers to the vq, the iothread can then start consuming them. Without this notification, the iothread only polls for free buffers when it times out or gets woken up otherwise. Other virtio devices do it similarly as well. Amit