Wednesday, September 16, 2009

Xen and the Art of Paravirtualization

The idea to actually go in and re-write the base code of the OS itself to work on your virtual machine is a pretty fascinating one. I'm glad the footnote mentioned that the practice traces the roots back to the 1960's, otherwise I was going to wonder why it hadn't been tried before this system (perhaps it was going to be one of those blindingly good ideas that you can't recognize until someone else points them out). But by going in and customizing the OS you're running there should be little surprise that there is a large performance gain over the original method of adding another whole stack of calls that need to constantly examining input for possible tricky commands.
The only issue with this approach (until the chapter later talks about stub domains) is that if there are major changes to the OS then you'll have to go through and discover where those changes may impact your hypercalls. In this case, focusing on new uses of the dreaded commands, or ones where past changes of your own have been overwritten by kernel upgrades.

As far as Domain 0 goes, splitting the interface to the actual hardware away from the tasks of creating, destroying, and some of the running of the VMs was a good choice to split the functions into two modules. This also minimized the amount of flow through the Hypervisor as can be seen in figure 7-6. This also, I imagine, allows the IOMMU to fit in easier, as there are fewer paths that are truly necessary to worry about. Giving each VM an abstracted representation of the hardware so that they could only, by design, look into memory space that they were allowed into seems like a great way to decrease the risk of ruining someone else's data. I'm just not sure I agree with or appreciate that the authors' response to adding in all these layers possibly defeating the efficiency gain from paravirtualization or similar methods is effectively "Don't worry, not only will hardware get faster, the hardware companies are now making our jobs easier by writing these things for us." It just seems like too much of a cop out to me. If this whole system was designed to bring speed instead of just flexibility shouldn't they still make that speed their number one priority?

No comments:

Post a Comment