From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EMYsC-0006B9-5g for qemu-devel@nongnu.org; Mon, 03 Oct 2005 18:33:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EMYs9-000680-1A for qemu-devel@nongnu.org; Mon, 03 Oct 2005 18:33:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMYs6-000658-BW for qemu-devel@nongnu.org; Mon, 03 Oct 2005 18:33:22 -0400 Received: from [206.46.252.44] (helo=vms044pub.verizon.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EMYp9-0003Bt-MX for qemu-devel@nongnu.org; Mon, 03 Oct 2005 18:30:19 -0400 Received: from [192.168.0.102] ([151.203.11.163]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0INT0026A2IH7VC7@vms044.mailsrvcs.net> for qemu-devel@nongnu.org; Mon, 03 Oct 2005 17:30:18 -0500 (CDT) Date: Mon, 03 Oct 2005 18:29:39 -0400 From: John Coiner Subject: Re: [Qemu-devel] [patch] non-blocking disk IO In-reply-to: <20051003135837.GC3511@suse.de> Message-id: <4341B0D3.7050804@stanfordalumni.org> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7bit References: <4340D479.7030301@stanfordalumni.org> <20051003135837.GC3511@suse.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Jens Axboe wrote: > Why not use aio for this instead, seems like a better fit than spawning > a thread per block device? That would still require a thread for > handling completions, but you could easily just use a single completion > thread for all devices for this as it would not need to do any real > work. Pthreads vs. AIO is an open question. The pthreads implementation works with all disk image formats, without modifying any format-specific code. To use AIO, each image format driver would have to be modified. QEMU already uses pthreads, therefore using pthreads does not add a new dependency on the host platform. (Or so I thought. The build on Windows broke anyway. Haha... my bad...) My questions are: * Which QEMU host platforms support Posix AIO? * Which host platform has the slowest pthreads library, and how many cycles will it waste on pthreads overhead? * What is the likely performance benefit of using AIO? When I have time, I'll hack AIO into the "raw" image driver, and take some benchmarks on a linux host. Thanks. -John