[openstack-dev] Some idea on device assignment support
Jiang, Yunhong
yunhong.jiang at intel.com
Thu Nov 1 10:26:09 UTC 2012
Hi, Vladimir/Mate/Yaguang
I'm considering the PCI pass-through support before I noticed related blueprints listed below. I'm considering if we can combine the GPU pass-through and general PCI pass-through together, or even more, implement a generic direct hardware resource assignment support, so that we can even easily to extend to USB and other devices (hmm, will anyone want to provide USB in cloud environment? ). After all, they are all resource that can't be shared, thus need carefully inventory management, need present usage status to user, possibly need some setup/clean before assigned to a new guest, need be released explicitly after instance destroyed etc.
https://blueprints.launchpad.net/nova/+spec/xenapi-gpu-passthrough
https://blueprints.launchpad.net/nova/+spec/pci-passthrough-and-sr-iov
https://blueprints.launchpad.net/nova/+spec/pci-passthrough
Below is some idea from my side, and hope to get your feedback.
1) How the compute node present the hardware resources? Each compute node will configure host specific hardware resources information, including "resource type", "resource description", "resource information", "resource handler classpath", "resource count" etc. Below are examples for vGPU in xen API, SR-IOV network devices, some encryption devices:
ResourceType: VGPU
Resource Information: PGPU grougp ID
Resource Description: XXXXXXX
Resource Count: 2
Resource handler class path: nova.virt.xenapi.vgpu
ResourceType: NIC_VF_1G
Resource Information: PCI path: Bus:Device:vFunction
Resource Description: SR-IOV NIC with 1G bandwidth
Resource Count: 3
Resource handler class path: nova.virt.libvirt.pci
ResourceType: Encryption_card
Resource Information: USB: VendorID: ProductID
Resource Description: Encryption card to encrypt data
Resource Count: 1
Resource handler class path: nova.virt.libvirt.usb
2) How the hardware resources managed globally? As Mate stated, each compute periodically report available hardware resources _publish_service_capabilities @ manager, the information should include [type, description, count] and is placed in host_state.capabilities. These information can be used by filter scheduler.
Several details need finalized, like how to make sure the same resource type in different host has same description, how to place such information in the database, what's the path in host_state.capabilities etc. But that can be resolved during implementation stage.
3) How user specifies a given instance needs hardware resource? As stated by Mate, it should be through extra specs like " hardware_resoruce:NIC_VF_1G=1". We can provide a new filer to make sure the cloud can meet such requirement, or, we can extend current compute capability filter. Also such information will be kept in the instance entry, so that corresponding handler will be invoked when the instance created.
4) How the cloud user get idea of available hardware resources? An extension will be provided so that novaclient/dashboard can fetch the hardware resource types, resource descriptions, and how much resources left etc.
Any idea/feedback on this?
Thanks
--jyh
More information about the OpenStack-dev
mailing list