From: Daniel Stodden Subject: Re: Odd blkdev throughput results Date: Mon, 17 Mar 2008 00:04:54 +0100 Message-ID: <1205708694.17474.99.camel@thinkpad.localdomain> References: <1205082786.14527.116.camel@thinkpad.localdomain> <1205097532.17897.69.camel@thinkpad.localdomain> <200803162115.51707.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <200803162115.51707.mark.williamson@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Williamson Cc: Ian Pratt , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Sun, 2008-03-16 at 21:15 +0000, Mark Williamson wrote: > > > > > Block IO doesn't require a copy at all. > > > > Well, not in blkback by itself, but certainly from the in-memory disk > > image. Unless I misunderstoode Keirs post recently, page flipping is > > basically dead code, so I thought the number should at least point in= to > > roughly the same directions. >=20 > Blkback has always DMA-ed directly into guest memory when reading data = from=20 > the disk drive (normal usecase), in which case there's no copy - I thin= k that=20 > was Ian's point. In contrast the Netback driver has to do a copy in th= e=20 > normal case. >=20 > If you're using a ramdisk then there must be a copy somewhere, although= I'm=20 > not sure exactly where it happens! I checked it, this is comparatively easy to find. Since DMA-or-not is ultimately up to the driver, it's that single memcpy() in rd.c. Looks rather straightforward.=20 In theory, such a pseudo-device could make use of the host DMA engine embedded into newer Intel chipsets to save a few cycles. But looking at the source that does not seem to be the case (and typical usage scenarios for the ramdisk driver (4MB default size iirc) would hardly justify the effort). Blkdev peak throughput at 500MB/s is certainly not a usability issue :) I just asked because I hoped someone who spent more time one the PV drivers than I did might have experienced (or even profiled) similar effects already, and could explain. Thanks and greetings, Daniel =20 --=20 Daniel Stodden LRR - Lehrstuhl f=C3=BCr Rechnertechnik und Rechnerorganisation Institut f=C3=BCr Informatik der TU M=C3=BCnchen D-85748 Garc= hing http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B