From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH RFC 3/3] virtio infrastructure: example block driver Date: Fri, 01 Jun 2007 09:39:25 +1000 Message-ID: <1180654765.10999.6.camel@localhost.localdomain> References: <1180613947.11133.58.camel@localhost.localdomain> <1180614044.11133.61.camel@localhost.localdomain> <1180614091.11133.63.camel@localhost.localdomain> <465EC637.7020504@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Jimi Xenidis , Stephen Rothwell , Xen Mailing List , "jmk-zzFmDc4TPjtKvsKVC3L/VUEOCMrvLtNR@public.gmane.org" , Herbert Xu , kvm-devel , mschwid2-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org, virtualization , Christian Borntraeger , Suzanne McIntosh , Jens Axboe To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Return-path: In-Reply-To: <465EC637.7020504-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Thu, 2007-05-31 at 14:57 +0200, Carsten Otte wrote: > Rusty Russell wrote: > > Example block driver using virtio. > > > > The block driver uses outbufs with sg[0] being the request information > > (struct virtio_blk_outhdr) with the type, sector and inbuf id. For a > > write, the rest of the sg will contain the data to be written. > > > > The first segment of the inbuf is a result code (struct > > virtio_blk_inhdr). For a read, the rest of the sg points to the input > > buffer. > > > > TODO: > > 1) Ordered tag support. > Implementing a do_request function has quite a few disadvantages over > hooking into q->make_request_fn. This way, we have the device plug > (latency), request merging, and I/O scheduling inside the guest. Now my lack of block-layer knowledge is showing. I would have thought that if we want to do things like ionice(1) to work, we have to do some guest scheduling or pass that information down to the host. > It seems preferable to do that in the host, especially when requests > of multiple guests end up on the same physical media (shared access, > or partitioned). What's the overhead in doing both? Rusty. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/