From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUKpP-0000Uc-NR for qemu-devel@nongnu.org; Mon, 11 Jan 2010 09:01:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUKpK-0000Sz-I9 for qemu-devel@nongnu.org; Mon, 11 Jan 2010 09:01:06 -0500 Received: from [199.232.76.173] (port=34444 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUKpK-0000Ss-CQ for qemu-devel@nongnu.org; Mon, 11 Jan 2010 09:01:02 -0500 Received: from mail-qy0-f194.google.com ([209.85.221.194]:48365) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUKpJ-00013Y-Fn for qemu-devel@nongnu.org; Mon, 11 Jan 2010 09:01:02 -0500 Received: by qyk32 with SMTP id 32so1825038qyk.4 for ; Mon, 11 Jan 2010 06:01:00 -0800 (PST) Message-ID: <4B4B2F19.2080401@codemonkey.ws> Date: Mon, 11 Jan 2010 08:00:57 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [RFC][PATCH] performance improvement for windows guests, running on top of virtio block device References: <1263195647.2005.44.camel@localhost> <4B4AE1BD.4000400@redhat.com> <4B4AE95D.7080305@redhat.com> <4B4AED19.3060401@redhat.com> <20100111131119.GB24241@lst.de> <4B4B2411.7030301@redhat.com> <20100111134733.GA27253@lst.de> In-Reply-To: <20100111134733.GA27253@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel , Dor Laor , Avi Kivity , Vadim Rozenfeld On 01/11/2010 07:47 AM, Christoph Hellwig wrote: > On Mon, Jan 11, 2010 at 03:13:53PM +0200, Avi Kivity wrote: > >> As Dor points out, the call to virtio_blk_handle_output() wants to be >> before the test for pending, so we scan the ring as early as possible >> > It could cause a race window where we add an entry to the ring after > we run virtio_blk_handle_output, but before re-enabling the > notification. But I think my variant of the patch that I just posted > should deal with this in an even better way. > When we've disabled notifications, we should use any opportunity we have in userspace to check the rings to see if anything was added. Bottom halves are run at the very end of the event loop which means that they're guaranteed to be the last thing run. idle bottom halves can be rescheduled without causing an infinite loop and do not affect the select timeout (which normal bottom halves do). Regards, Anthony Liguori > >