[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] Re: [kvm-devel] [PATCH RFC 3/3] virtio infrastructure: example block driver
- To: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
- From: Carsten Otte <cotte@xxxxxxxxxx>
- Date: Thu, 31 May 2007 14:57:27 +0200
- Cc: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>, Xen Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>, "jmk@xxxxxxxxxxxxxxxxxxx" <jmk@xxxxxxxxxxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, kvm-devel <kvm-devel@xxxxxxxxxxxxxxxxxxxxx>, mschwid2@xxxxxxxxxxxxxxxxxx, virtualization <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Christian Borntraeger <cborntra@xxxxxxxxxx>, Suzanne McIntosh <skranjac@xxxxxxxxxx>
- Delivery-date: Thu, 31 May 2007 10:28:33 -0700
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
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.
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).
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|