summerofcode2015:ptnetmaponbhyve

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
summerofcode2015:ptnetmaponbhyve [2015/05/27 09:28] – add some break lines StefanoGarzarellasummerofcode2015:ptnetmaponbhyve [2017/09/18 13:58] (current) – Use local wiki LinkNames (remove absolute wiki urls) KubilayKocak
Line 1: Line 1:
 ====== A FreeBSD/bhyve version of the netmap virtual passthrough (ptnetmap) for VMs. ====== ====== A FreeBSD/bhyve version of the netmap virtual passthrough (ptnetmap) for VMs. ======
-  * Student: [[http://wiki.freebsd.org/StefanoGarzarella|Stefano Garzarella]]+  * Student: [[/StefanoGarzarella]]
   * Mentor: [[http://info.iet.unipi.it/~luigi|Luigi Rizzo]]   * Mentor: [[http://info.iet.unipi.it/~luigi|Luigi Rizzo]]
  
Line 7: Line 7:
 To avoid VMs networking bottlenecks, I recently worked with my advisors on ptnetmap: a netmap virtual passthrough for VMs (ptnetmap). To avoid VMs networking bottlenecks, I recently worked with my advisors on ptnetmap: a netmap virtual passthrough for VMs (ptnetmap).
  
-**ptnetmap allows userspace applications running in a guest VM to safely use any netmap port with near-native performance (physical devices [14.88 Mpps], software switches [20 Mpps], shared memory channels [75 Mpps]).**+**ptnetmap allows userspace applications running in a guest VM to safely use any netmap port with near-native performance (physical devices [14.88 Mpps], software switches [20 Mpps], shared memory channels [50 Mpps]).**
  
 I developed a preliminary version for linux/KVM hosts. For this %%GSoC%% project I'll develop host ptnetmap support for bhyve/%%FreeBSD%%. I developed a preliminary version for linux/KVM hosts. For this %%GSoC%% project I'll develop host ptnetmap support for bhyve/%%FreeBSD%%.
Line 32: Line 32:
 which requires work in the following areas: which requires work in the following areas:
  
-- netmap framework modifications both for the guest part and the host part, to+- **netmap framework modifications** both for the guest part and the host part, to
 implement the virtio-like communication and the shared netmap memory; implement the virtio-like communication and the shared netmap memory;
 (existing code ~ 1900 loc in netmap framework + 300 loc OS specific; (existing code ~ 1900 loc in netmap framework + 300 loc OS specific;
 estimated new code ~ 300 + 300 loc) estimated new code ~ 300 + 300 loc)
  
-- guest device driver modifications for the setup of the notification mechanism+- **guest device driver modifications** for the setup of the notification mechanism
 and to share netmap memory; and to share netmap memory;
 (estimated new code ~800 loc for virtio, assuming the existing netmap (estimated new code ~800 loc for virtio, assuming the existing netmap
 support for virtio developed by my advisor) support for virtio developed by my advisor)
  
-- bhyve extensions to expose netmap host memory to the guest and to exchange+- **bhyve extensions** to expose netmap host memory to the guest and to exchange
 notifications. notifications.
 We need a mechanism like linux's eventfd to exchange notifications and a way We need a mechanism like linux's eventfd to exchange notifications and a way
Line 64: Line 64:
  
 === D3 (due by week 9): === === D3 (due by week 9): ===
-implement notification mechanism in bhyve/%%FreeBSD%%. 
-We want to have a similar mechanism to ioeventfd and irqfd available in linux, 
-to exchange notifications between guest and host threads. 
-Risk factor: We don't know how long it takes because in linux we had eventfd 
-already implemented. 
- 
-=== D4 (due by the end of project): === 
 kernel thread in netmap host adapter to implement ptnetmap on %%FreeBSD%% host. kernel thread in netmap host adapter to implement ptnetmap on %%FreeBSD%% host.
 We expect to have the same performance of KVM (over 20 Mpps on VALE port; We expect to have the same performance of KVM (over 20 Mpps on VALE port;
-over 75 Mpps on netmap-pipe; line rate [14.88 Mpps] on Physical [10Gbps] NICs).+over 50 Mpps on netmap-pipe; line rate [14.88 Mpps] on Physical [10Gbps] NICs).
 The code that the kthread runs, is already done. We need to implement only The code that the kthread runs, is already done. We need to implement only
 the functions to create/delete kernel thread and to handle notifications. the functions to create/delete kernel thread and to handle notifications.
 (~300 loc on linux). (~300 loc on linux).
 +
 +=== D4 (due by the end of project): ===
 +implement notification mechanism in bhyve/%%FreeBSD%%.
 +We want to have a similar mechanism to ioeventfd and irqfd available in linux,
 +to exchange notifications between guest and host threads.
 +Risk factor: We don't know how long it takes because in linux we had eventfd
 +already implemented.
  
 ===== Milestones ===== ===== Milestones =====
Line 86: Line 86:
 === Timetable: === === Timetable: ===
  
-Week 1-2: add ptnetmap support to virtio device driver and QEMU frontend [D1].+Week 1-2: add ptnetmap support to virtio device driver and QEMU frontend [D1]. --- DONE ---
  
-Week 3: test, bugfix, and performance evaluation [D1].+Week 3: test, bugfix, and performance evaluation [D1]. --- DONE ---
  
-Week 4-5: write code to map netmap host memory into the guest [D2].+Week 4-5: write code to map netmap host memory into the guest [D2]. --- DONE ---
  
-Week 6: test and bugfix [D2]. prepare documents to mid-term evaluation.+Week 6: test and bugfix [D2]. prepare documents to mid-term evaluation. --- DONE ---
  
-Week 7-8: implement notification mechanism in bhyve/freebsd [D3].+Week 7-8: implement kernel thread in netmap host adapter [D3]. --- DONE ---
  
-Week 9: test and bugfix [D3].+Week 9: test and bugfix [D3]. --- DONE ---
  
-Week 10: implement kernel thread in netmap host adapter [D4].+Week 10: implement notification mechanism in bhyve/freebsd [D4]. --- DONE ---
  
-Week 11: test and performance evaluation [D4].+Week 11: test and performance evaluation [D4]. --- DONE ---
  
-Week 12: clean code and prepare documents to final evaluation.+Week 12: clean code and prepare documents to final evaluation. --- DONE ---
  
 ===== The Code ===== ===== The Code =====
  
-[[https://socsvn.freebsd.org/socsvn/soc2015/stefano|soc2015/stefano]]+[[https://svnweb.freebsd.org/socsvn/soc2015/stefano/|soc2015/stefano]]
  
-[[https://socsvn.freebsd.org/socsvn/soc2015/stefano/ptnetmap-head|ptnetmap-head]]+[[https://svnweb.freebsd.org/socsvn/soc2015/stefano/ptnetmap/stable/10/|ptnetmap-10-STABLE]]
  
 ===== Useful links ===== ===== Useful links =====
  • summerofcode2015/ptnetmaponbhyve.1432718915.txt.gz
  • Last modified: 2015/05/27 09:28
  • by StefanoGarzarella