Xen scsifront/back drivers
FUJITA Tomonori
tomof@acm.org NTT Cyber Solutions Laboratories Xen Summit 2006
Xen scsifront/back drivers FUJITA Tomonori tomof@acm.org NTT Cyber - - PowerPoint PPT Presentation
Xen scsifront/back drivers FUJITA Tomonori tomof@acm.org NTT Cyber Solutions Laboratories Xen Summit 2006 Current Block I/O: blkfront/back (or blktap) Beauty Simple and fast (Xen origianl protocol) Issues Extra effort for some
FUJITA Tomonori
tomof@acm.org NTT Cyber Solutions Laboratories Xen Summit 2006
2
– Simple and fast (Xen origianl protocol)
– Extra effort for some software
– Possible improvement
3
– The frontend and backend drivers use SCSI RDMA
Protocol (SRP) through the ring buffer
– User-space daemon in dom0 does SCSI protocol
processing and I/O executions (similar to blktap)
– The exisiting software just works – Linux SCSI mid-layer provides error handling,
dynamic management, various device suport, etc
4
target entity target entity logical unit logical unit file file file-backed VM1 VM2 Xen VMM scsifront driver VM0 scsiback driver SCSI RDMA Commands through ring buffer looks like a SCSI host bus adapter user-space daemon kernel/user communication through shared memory DomU Initiator devies (client) sends requests Dom0 Target devies (server) receives requests Inside the daemon
5
– Exports whatever you want to VMs: raw partitions,
regular files, LVM, files over network, etc
– Easily nice tricks like metadata disk format
– scsifront grants pages – scsiback maps the pages to user space
– scsifront is a simple SCSI Virtual HBA driver – scsiback exploits SCSI target framework (tgt)
6
User Space Kernel Space tgt daemon tgt core SCSI Mid layer Xen scsiback driver IBM pSeries target driver Qlogic FC target driver Shared memory tgt kernel API System calls tgtadm Transport class Unix socket Target driver libraries Disk drives management tool User-space daemon
tgt can simplify SCSI target drivers by providing SCSI protocol processing, target and logical unit management, etc
Various target drivers
Xen scsiback only handles low level details
tgt support various SCSI transport protocol target drivers, fibre channel, SRP, iSCSI, etc
7
maps the pages to tgtd's address space
kernel APIs
tgtd via scsiback and tgtd
between tgt-core and tgtd
sends the resutls to scsiback via tgt core
8
tree
– ibmvstgt driver
– libsrp
Xen scsiback and ibmvstgt drivers
9
– DomU can fdisk, mkfs, read/write with virtual disk
– Added AIO support to user-space daemon (tgtd) for
better performance
– Modified libsrp for scsiback driver
10
– Use tgt's shared buffer to send the mapped page
info and remove scsiback's own shared buffer
– scsifront is the third SRP initiator driver in Linux
provides common features for SRP initiator drivers
– SCSI-ml already has SPI, FC, iSCSI, SAS transport classes
– libsrp provides common features SRP target drivers
11
– tgtd needs to wait on AIO and non-AIO file
discriptors, however, no handy interface for that.
– blktap daemon needs it too and uses a kernel
patch to add AIO event support to select interface
– Short term solution is adding non-AIO event
support to AIO interface (under development)
– Long term solution is unified event notification
facility such as kevent (still no agreement on the design)
12
– easily takes blktap code
many SCSI virtualization possibilities
– A tape drive by using a file – A cdrom drive by using an iso image file
– tgtd executes SCSI commands via SG_IO
13
– http://lists.xensource.com/archives/html/x
en-devel/2006-08/msg00096.html
– http://stgt.berlios.de/