Advertisement
Guest User

Matt Dillon - vkernels

a guest
Nov 15th, 2016
833
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. Hi Allan, Kris! Love your shows as always!
  2.  
  3. On 164 you had some questions about DragonFly's vkernels. vkernels
  4. are DragonFly's original attempt at implementing virtualization,
  5. without actually needing to implement virtualization. DragonFly itself
  6. does not have a full-fledged hardware virtualization abstraction like one
  7. sees on Linux or FreeBSD. Eventually we might port one, but it isn't
  8. a strong point for us. I'd rather focus on system performance. I would
  9. like DFly to run well under a virtualized environment as a guest.
  10. Some of our devs are interested in porting a hosting capability from
  11. one of the other BSDs once they have something that works well.
  12.  
  13. The DragonFly vkernel is essentially just the DragonFly kernel compiled
  14. as a user-mode application. Meaning the vkernel 'drivers' can just use
  15. normal system calls to implement disk and network I/O. The real DFly
  16. kernel provides a virtualized page table abstraction (VMX not required),
  17. and execution context management, and that's pretty much all the vkernel
  18. needs. The vkernel implementation is pretty good, though the pmap
  19. implementation in platform/vkernel64 currently uses a global lock and
  20. is significantly behind the real kernel in terms of SMP performance.
  21.  
  22. The intent of the vkernel is to make it easier to test DragonFly kernel
  23. features in a user mode context for debugging purposes, and to provide
  24. a layer of security for people who don't trust normal user-based
  25. compartmentalization. And, of course, it is much easier to manage
  26. resource caps with a vkernel. But as with any virtualized system,
  27. the trade-off against perfomrance is fairly severe.
  28.  
  29. --
  30.  
  31. In anycase, the COW feature simply mmap()'s the disk image MAP_PRIVATE+RW
  32. instead of using pread()/pwrite(). It's great for managing many vkernels
  33. with a single base system image. Since multiple disk images can be
  34. specified (and one can of course use NFS as well), this does not prevent
  35. having a second, normal write-back image, for data. Having easy base
  36. system replication coupled with a writable mount is an incredibly useful
  37. feature to have, much easier to work with than a read-only NFS mount.
  38.  
  39. It isn't unionfs... I'm not saving the changes anywhere. It would be
  40. fairly easy to do so, but I think it would be even easier to not bother
  41. and simply instrument the system running under the vkernel to spool off
  42. anything it wants to retain across reboots to a non-COW partition, NFS
  43. mount, or other outside-of-COW storage.
  44.  
  45. -Matt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement