This project optimizes the I/O performance of FreeBSD as a Xen HVM DomU. It provides a USB front-end driver and a SCSI front-end driver to FreeBSD Xen HVM DomU. With these drivers, FreeBSD DomU can access the USB and SCSI devices provided by Xen instead of that emulated by QEMU. It improves the performance of reading and writing data to the devices.
With the GENERIC config, FreeBSD Xen DomU accesses to the USB device by Qemu-dm USB passthrough supported by Xen. It needs to specify “usb=1” and “usbdevice='host:xxxx:yyyy'” in the DomU's config file. It doesn't require backed driver in Dom0 and front driver in DomU. However, this method is low performance. A USB front-end driver is part of the Xen para-virtualization mechanism. It forwards the USB I/O request from the DomU to the USB back-end driver in Dom0, and then the back-driver dispatches the request to the native USB device driver, which will access to the physical USB device and give the response to the USB back-end driver. At last, USB front-end driver can receive the result of the device request. This mechanism is known as PVUSB. PVUSB will replace the device emulated by Qemu and extremely improve the performance of USB I/O access.
The SCSI device access in FreeBSD DomU is supported through device emulated by QEMU currently. The project is very similar to the USB front-end driver. The para-virtualized SCSI driver is also known as PVSCSI. It can be used by a Xen PV or HVM guest to passthrough the SCSI device, such as tape drives, scanners, printers and CD drives. PVSCSI works like the PVUSB. The front-end driver forwards the SCSI device I/O request from the DomU to SCSI back-end driver in Dom0. And then, it receives the result from the SCSI device forwarded by back-end driver
We break the problem into smaller parts that we will solved.
Features to implement in this project.
An initiatory milestones are made here. We will adjust it according to the progress of this project in reality.
The USB front-end driver is still under development in later several months.
A rough test plan is made as the following. a) Test for USB Front-End Driver
b) Test for SCSI Front-End Driver